Hi there, I would like to ask 2 questions, both regarding the layout and views.
a) After installing cake 1.2 and accessing my localhost domain, I get to see the cake info page and everything works fine. If i access a url that is lacking the underlying controller or view, I get to see cake's error message about the corresponding view file missing etc. When I create my own template under /app/views/layout/default.ctp, it all works fine but whenever I hit invalid urls (as above) nothing happens (i.e. i still get to see my default template but without the error messages). I read somewhere that by overriding the default.ctp layout file, you are effectively changing every page that cake would render, so perhaps I'm missing some variables in my layout? (e.g $content_for_layout, $title_for_layout etc?) b) I have been given all the templates for an application by a web designer. Let's say that the default layout consists of a header, a menu, the 'main body' and a footer. What is the correct approach for breaking this down in cake ? I assume that my default layout should contain the common elements that are always present (i.e header, menu, footer), and all other views will be rendered within the 'main body' section of the layout. However if this is the case, it would mean that the actual layout, in the header section should also contain code like: if(session) print "hello $user" else show login link. This somehow feels wrong. Should i have code like that in my layout ? What is the best practice for using a default template and some views? thanks a lot, jason --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---