Re: Would it be possible to use different default.ctp (or shall I say, different templates) for each controllers?

2010-06-18 Thread Justin Gruenberg
On Thu, Jun 17, 2010 at 10:30 PM, Louie Miranda lmira...@gmail.com wrote:
 Would it be possible to use different default.ctp (or shall I say, different
 templates) for each controllers?

 To better understand, here's some:

 EXAMPLE:
 CONTROLLER/PAGE/URL: example.com/welcome
 VIEW/TEMPLATE: /app/views/layouts/welcome.ctp

 CONTROLLER/PAGE/URL: example.com/goodbye
 VIEW/TEMPLATE: /app/views/layouts/goodbye.ctp

 I only knew one thing about cake and that is to use a single template which
 is the /app/views/layouts/default.ctp

 Has anyone done this? Google was not able to search some for me. :(

For the urls, you'll need to set those up using routing.  You can set
the layout for each in the controller method by setting $this-layout
to the whichever layout you need.

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Would it be possible to use different default.ctp (or shall I say, different templates) for each controllers?

2010-06-17 Thread Zaky Katalan-Ezra
Use theme
http://book.cakephp.org/view/488/Themes

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Would it be possible to use different default.ctp (or shall I say, different templates) for each controllers?

2010-06-17 Thread Louie Miranda
Great!!! thanks a lot.
--
Louie Miranda
- Email: lmira...@gmail.com
- Web: http://www.louiemiranda.com



On Fri, Jun 18, 2010 at 12:22 PM, Zaky Katalan-Ezra procsh...@gmail.comwrote:

 Use theme
 http://book.cakephp.org/view/488/Themes

  Check out the new CakePHP Questions site http://cakeqs.org and help
 others with their CakePHP related questions.

 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor
  more options, visit this group at
 http://groups.google.com/group/cake-php?hl=en


Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Would it be possible to use different default.ctp (or shall I say, different templates) for each controllers?

2010-06-17 Thread Jeremy Burns | Class Outfit
In your controller function type: $this-layout = 'goodbye';

Jeremy Burns
Class Outfit

jeremybu...@classoutfit.com
http://www.classoutfit.com

On 18 Jun 2010, at 04:30, Louie Miranda wrote:

 Would it be possible to use different default.ctp (or shall I say, different 
 templates) for each controllers?
 
 To better understand, here's some:
 
 EXAMPLE:
 CONTROLLER/PAGE/URL: example.com/welcome
 VIEW/TEMPLATE: /app/views/layouts/welcome.ctp
 
 CONTROLLER/PAGE/URL: example.com/goodbye
 VIEW/TEMPLATE: /app/views/layouts/goodbye.ctp
 
 I only knew one thing about cake and that is to use a single template which 
 is the /app/views/layouts/default.ctp
 
 Has anyone done this? Google was not able to search some for me. :(
 --
 Louie Miranda
 - Email: lmira...@gmail.com
 
 
 Check out the new CakePHP Questions site http://cakeqs.org and help others 
 with their CakePHP related questions.
  
 You received this message because you are subscribed to the Google Groups 
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
 http://groups.google.com/group/cake-php?hl=en

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en


Re: Would it be possible to use different default.ctp (or shall I say, different templates) for each controllers?

2010-06-17 Thread Louie Miranda
That's easier than the theme. Thanks Jeremy.
--
Louie Miranda
- Email: lmira...@gmail.com
- Web: http://www.louiemiranda.com



On Fri, Jun 18, 2010 at 1:28 PM, Jeremy Burns | Class Outfit 
jeremybu...@classoutfit.com wrote:

 In your controller function type: $this-layout = 'goodbye';

 Jeremy Burns
 *Class Outfit*
 *
 *
 jeremybu...@classoutfit.com jeremybu...@mac.com
 http://www.classoutfit.com

 On 18 Jun 2010, at 04:30, Louie Miranda wrote:

 Would it be possible to use different default.ctp (or shall I say,
 different templates) for each controllers?

 To better understand, here's some:

 *EXAMPLE:*
 CONTROLLER/PAGE/URL: example.com/welcome
 VIEW/TEMPLATE: /app/views/layouts/welcome.ctp

 CONTROLLER/PAGE/URL: example.com/goodbye
 VIEW/TEMPLATE: /app/views/layouts/goodbye.ctp

 I only knew one thing about cake and that is to use a single template which
 is the /app/views/layouts/default.ctp

 Has anyone done this? Google was not able to search some for me. :(
 --
 Louie Miranda
 - Email: lmira...@gmail.com


 Check out the new CakePHP Questions site http://cakeqs.org and help others
 with their CakePHP related questions.

 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.com For more options, visit this group
 at http://groups.google.com/group/cake-php?hl=en


  Check out the new CakePHP Questions site http://cakeqs.org and help
 others with their CakePHP related questions.

 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To post to this group, send email to cake-php@googlegroups.com
 To unsubscribe from this group, send email to
 cake-php+unsubscr...@googlegroups.comcake-php%2bunsubscr...@googlegroups.comFor
  more options, visit this group at
 http://groups.google.com/group/cake-php?hl=en


Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
CakePHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en