Hi,

I want to generate the page title out of the given meta keywords,
separated by the pipe symbol ”|“.

Eg:
[view.yml]
indexSuccess:
    metas:
        keywords: computer, science, maths


in filters the should be sth. like:

class prepareTitleFilter extends sfFilter
{
  public function execute ($filterChain)
  {
    if ($this->isFirstCall())
    {
      $response = $this->getContext()->getResponse();
      $metas = $response->getMetas();

      if ( isset($metas['keywords']) )
      {
        $this->title = implode(' | ', preg_split('@,\s*@', $metas
['keywords']));
        $response->setTitle( $this->title );
      }
    }
    $filterChain->execute();
  }
}

My poblem: I can't find the right position in the chain to place my
own filter. Either I can set the page title but can't get the
keywords, or I can read the keywords and it's too late for setting the
title.

An idea, anybody?

--~--~---------~--~----~------------~-------~--~----~
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 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to