How to access only the Component heading/title in a Joomla! 1.5 template

Written by Ian Carnaghan · 24 sec read >

How to access only the component heading/title in a Joomla! 1.5template when building a new template and the component heading needs to be in a strategic place on the template.

Insert the following code where you need to have the component heading displayed on the template.

//Open PHP tag
//First we instantiate the document object, to get all document details.
 $document =& JFactory::getDocument();

//Now we echo the component heading by echoing the getTitle() method of the getDocument class 
echo $document->getTitle();

//Closing PHP tag

NOTE: This has been tested in Joomla! 1.5.10. I don’t think this is the right method to do this, only use this if absolutely neccesary.

Last Updated On April 06, 2018
Written by Ian Carnaghan
I am a software developer and online educator who likes to keep up with all the latest in technology. I also manage cloud infrastructure, continuous monitoring, DevOps processes, security, and continuous integration and deployment. Profile

Leave a Reply

Notify of