Gary Gauthier
Gary Gauthier

Reputation: 195

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.

Upvotes: 1

Views: 2287

Answers (1)

Gary Gauthier
Gary Gauthier

Reputation: 195

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

Upvotes: 4

Related Questions