Plugin to edit the page title - Joomla! Forum - community, help and support
i'm trying write plugin alter page_title of joomla page.
i know how , edit title:
or:
i'm not sure method works best. regardless use, plugin triggered late.
that is, after page title displayed already. right i'm using content plugin. tried trigger plugin (onpreparecontent, onafterdisplaytitle, etc) nothing works.
i tried system plugin. didn't work either.
i hope can tell me how can working
i know how , edit title:
code: select all
global $mainframe;
$page_title = $mainframe->getpagetitle();
$mainframe->setpagetitle( "something" );
or:
code: select all
$document= & jfactory::getdocument();
$page_title $document->gettitle();
$document->settitle("something");
i'm not sure method works best. regardless use, plugin triggered late.
that is, after page title displayed already. right i'm using content plugin. tried trigger plugin (onpreparecontent, onafterdisplaytitle, etc) nothing works.
i tried system plugin. didn't work either.
i hope can tell me how can working
it not work content plugin, triggered late in process of creating joomla document.
the document title set during dispatch stage of joomla process, think need system plugin, , use onafterdispatch handler.
hope helps.
the document title set during dispatch stage of joomla process, think need system plugin, , use onafterdispatch handler.
hope helps.
Comments
Post a Comment