I just finished a site that required 4 different templates. Our home page had its own template. We have a wiki section that has its own template. Then we have the default template that every other page uses and of couse we have the Ajax template. Template is interchangelbe with layout. Each template in our system has its own layout. So our homepage.thml layout linked to its own set of CSS files for example. When we render the home.thml view in the conroller, we tell cake to use the homepage.thtml layout:
class VisitorsController extends AppController{ . . . function index(....){ ... // Tell Cake to render the home.thtml view inside of the homepage.thtml layout $this->render('home', 'homepage'); } } I hope that this helps. Later On Jan 27, 4:47 pm, "Mech7" <[EMAIL PROTECTED]> wrote: > Is there any tutorial how i could create templates for an application? > So i would have one directory with all the views and can switch them > for different styles ? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---