Hi All,

this is probably something pretty common for all of us. I would like
the site title to be appended / perpended (not sure what one yet) to
each page title. So if a template is set to have "About Us" in the
view.yml, the actual rendered title will be "About Us - Site Name"

i figured a filter is the way to go:

class titleFilter extends sfFilter
{
        public function execute($filterChain)
        {

                $filterChain->execute();

                if ($this->isFirstCall())
                {
                        $title = $this->getContext()->getResponse()->getTitle();
                        $this->getContext()->getResponse()->setTitle($title.' - 
'.$this-
>getContext()->getI18N()->__(sfConfig::get('app_title_suffix')));
                }
        }
}

and in filters.yml

title_suffix:
  class: titleFilter

dosent work at all. i have not done much with the filters and unsure
if the code should go before the $filterChain->execute(); and if the
if ($this->isFirstCall()) is nessacary or useless.

Any help on this would be appreciated.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to