Ceryl, your're absolutely right. Didn't occur to me that i can use $this->set('title_for_layout',...); in view.
Tnx. On 11 okt., 21:09, Céryl <c.a.h.wilt...@student.tue.nl> wrote: > The "echo Title_for_layout" can be in the <HEAD> section of your > layout. > > You can then place: > <?php $this->set('title', 'YourTitle'); ?> > anywhere in the view to have the title changed per view. Personally, I > always add an "echo 'MySite | '" just before the title_for_layout so > that each view will have a title resembling "MySite | Products" or > something... > > On 11 okt, 19:30,mmalca<m...@nahtigal.com> wrote: > > > There was an elegant way to set page title anywhere in view using > > CakePHP 1.2 - with $this->pageTitle = 'new title'; This has been > > removed in cakephp 1.3 in favor of $this->set('title_for_layout', > > 'page title'); > > > Is there no simple way left to set page title elsewhere in view? Can > > it be changed/set only in controller? > > > Here's an example. I want to change page title in my theme (in a view > > without overriding default layout). This was possible by setting $this- > > > >pageTitle. So: how can a custom view theme change page title? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---