Re: PagesController and titles
John Zimmerman [gmail] писал(а): ?php $this-pageTitle = 'New Title For Static Page'; ? damnit. I knew there is a better method! Though I don't recall this in manual.. S. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
Re: PagesController and titles
I didn't find it in the manual either. I just stumbled upon the variable playing around with pr() in various places and figured out I could set the variable in the view too.the pr() function is very useful for just exploring variables in Cake. Just do a pr($this) in your controller, view, or model and you can get quite a bit of information.On 7/28/06, Sergei [EMAIL PROTECTED] wrote:John Zimmerman [gmail] писал(а): ?php $this-pageTitle = 'New Title For Static Page'; ? damnit. I knew there is a better method!Though I don't recall this in manual..S. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
PagesController and titles
Hi, if you need to set custom titles for static pages, here's a solution: 1. just copy pages_controller.php to your app/controllers dir. 2. make an array after line var $uses = null; ... like this: var $titles = array ( 'help' = 'Ваша помощь', 'faq' = 'Вопросы и ответы', 'agreement' = 'Соглашение', 'your_view_name' = 'your_page_title', ); 3. change this line 96. $title = ucfirst($path[$count - 1]); to this: 96. $title = $this-titles[$path[$count - 1]]; That's it. S. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---