Hello mates,
I am creating a plugin to define the HTML tag on the page <title> regardless, I do so in my plugin:
function onK2AfterDisplayContent(&$item, &$params, $limitstart){
$mainframe = JFactory::getApplication();
$plugins = new K2Parameter($item->plugins, '', $this->pluginName);
$output = 'Test - '.$plugins->get('Title_item');
$document=& JFactory::getDocument();
$document->setTitle($output);
return $output;
}
Well, how you see, I entered "manually" the word "Test -" the result in html is <title> 'Test -' </ title> instead on my K2 template when called "K2AfterDisplayContent" shows me screen "Test - This test is" complete whole.
It's like ignore $plugins->get('Title_item') to call SetTitle, but instead, it works correctly text below in page.
I hope I explained well ... Any help?
Thank you!