[TYPO3] Change page title in own FE plugin

Dmitry Martynenko dima at realt.by
Fri Feb 15 18:15:54 CET 2008


Hi List,

I've investigated how to change page title in USER_INT plugins :)
May be it'll interest someone.

When extension is USER, it is very simple.
Just do $GLOBALS['TSFE']->page['title'] = $my_header;

But USER_INT plugin in that case do nothing, because page header and
body already compiled.

Hence I need modify compiled content like that:

$GLOBALS['TSFE']->content = preg_replace(
  '@<title>(.+):(.*)</title>@i',
  '<title>$1: '.$my_header.' | $2</title>',
  $GLOBALS['TSFE']->content);

Any comments on this ?

-- 
Dmitry Martynenko
Developer

Web: http://realt.by



More information about the TYPO3-english mailing list