How do I set the title of a page in a joomla component?
I have a very simple joomla component that returns database results. It is 开发者_运维百科not structured int the MVC format. How do I code the component so I can designate a page title? I wouldn't want to disable the existing functionality of joomla content articles.
After some trolling on the internet, I found this code. It works like a charm.
$browserbar= "anything you want";
$document = JFactory::getDocument();
$document->setTitle($browserbar);
See this page for details on other metatags:
http://www.packtpub.com/article/customizing-document-with-joomla-1.5-part1
精彩评论