0
votes

On all my Joomla pages I have the articles title as the h1 tag, so until now, Joomla has always displayed the title, i.e. what you see on the browser tab as the h1 tag. (There were one and the same thing).

However, this is not the case with all the pages that have no menu item linking to them, (they are linked to the rest of the site through another article). Here the name of my site is the page title.

How do I make the h1 tag the page title on these pages?

2

2 Answers

0
votes

Try this,

This is happen due to those article pages meta options have title, Meta tag and keywords those are blank or not set yet. Then this case Joomla will read those info from your Global settings It may have your site name and Global description.

So the solution is set the Proper meta info for those articles from article manager.

If it is not practical then you can try it from article view or layout page Set meta data of Joomla page

enter image description here

Second Method is for setting the page title forcefully from scripts. It used for any components like here you have to check first method it will work for you..

Hope its Helps..

0
votes

Problem solved! Here is how:

Make an override of com_content article and edit the default.php. Around lines 42/43 you should have the following code (the line number may not be exact as I have already taken out some code for a previous override):

<?php if ($params->get('show_title') || $params->get('show_author')) : ?>

Straight after that, add the following lines of code:

<?php $document=& JFactory::getDocument();
$document->setTitle( $this->item->title ); ?>