Hi!
Is there a good way to change static page titles?
I am using CViewAction for static pages, but all of those pages has the same page title.
I want different titles for different static pages.
Thank you.
Page 1 of 1
Page Title For Static Pages
#2
Posted 07 December 2012 - 11:26 AM
by default CViewAction renders static pages as PHP ('renderAsText' switch). If you haven't changed this switch you can add plain php code to your static views. this code can be something like this:
then you can use this information in layout to render page title.
<?php Yii::app()->name = 'this static page name'; //or Yii::app()->controller->title = 'xxxx'; ?>
then you can use this information in layout to render page title.
red
Share this topic:
Page 1 of 1

Help












