开发者

How do I set the title of a page in a joomla component?

开发者 https://www.devze.com 2022-12-27 20:05 出处:网络
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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消