Hi all, I need to write my title page like this : MYSITENAME :: {TITLE}

Where {TITLE} is set into action view script and MYSITENAME is a string egual for all pages.

I have think to redefine headTitle() with this:

class Skebby_WWW_Helper_headTitle extends Zend_View_Helper_HeadTitle {
   static $_first = 0;
private $_view; function headTitle($value = null) {
       $this->_first++;
       if ($this->_first == 1) {
           parent::headTitle()->setSeparator(' - ');
           parent::headTitle('Skebby.it');
       }
       parent::headTitle($value);
   }
function SetView(Zend_View_Interface $view)
   {
       $this->_view = $view;
   }
}

But this does not work. I know that there is an conceptual error, but where ?

For the moment I have created an Helper (SetTile) that use headTitle()'s 2n parameter:

class MYDOMAIN_WWW_Helper_setTitle  {
   static $_first = 0;
private $_view; function setTitle($value = null) {
       $this->_first++;
       if ($this->_first == 1) {
$this->_view->headTitle(Zend_Registry::get('config')->WWW_TITLE,Zend_View_Helper_Placeholder_Container_Abstract::PREPEND);
       }
       $this->_view->headTitle($value);
   }
function SetView(Zend_View_Interface $view)
   {
       $this->_view = $view;
   }
} , but I need to remember to use setTitle and not headTitle in every .phtml file (or action).

Tnx for any help.

--
Michel 'ZioBudda' Morelli                       [EMAIL PROTECTED]
Consulenza sistemistica in ambito OpenSource.
Sviluppo applicazioni web dinamiche (LAMP+Ajax)
Telefono: 0200619074
Telefono Cell: +39-3939890025 --  Fax: +39-0291390660

http://www.ziobudda.net ICQ: 58351764 http://www.ziobuddalabs.it Skype: zio_budda http://www.ajaxblog.it MSN: [EMAIL PROTECTED] JABBER: [EMAIL PROTECTED]

Reply via email to