Skip to content

Search Engine Optimisation icon

Applying Header Tags to your Mambo Page Titles

Applying header tags to Mambo page titles involves a small core hack. If you are not comfortable with hacking the core Mambo files you can achieve a similar result by using the technique discussed in this earlier tutorial.

This simple tip will help your search engine optimisation for Mambo. Elsewhere on this site you will find tutorials discussing the importance of title tags and the use of a document outline. The current versions of Mambo do not use heading tags for page titles. With this simply hack you can change that.

Navigate to /components/com_content and locate the file called content.html.php. Open this file and go to around line 567 (this may vary depending on the version of Mambo you are using).

Where you find this code:
<td class="contentheading<?php echo $params->get( 'pageclass_sfx' ); ?>" width="100%">
<?php echo $row->title;?>
<?php HTML_content::EditIcon( $row, $params, $access ); ?>

Add <h2></h2> around the page title if you already use h1 eg. <h1>Your Site Name</h1>

This will result in this:
<td class="contentheading<?php echo $params->get( 'pageclass_sfx' ); ?>" width="100%">
<h2><?php echo $row->title;?></h2>
<?php HTML_content::EditIcon( $row, $params, $access ); ?>

Your page titles will now be output within h2 tags. You can style these tags using CSS. To give them a unique style, colour or size that applies only to your page titles, add .contentheading h2 {your styles} to your template_css.css.

Enjoy!

Bookmark This:
  • bodytext
  • Technorati
  • del.icio.us
  • Facebook
  • Google
  • StumbleUpon
  • Reddit

Whether I am developing Mambo or working on tutorials I am fuelled by coffee. Caffeine keeps me going so if you like the work I am doing please click on the cup to buy me a coffee today. Just $10 covers the cost of getting my caramel macchiato ;)

If you enjoyed this article make sure you subscribe to my RSS feed!

One Response to “ Applying Header Tags to your Mambo Page Titles ”

Header Tags said on:

I've been looking for this information for quite awhile regarding this CMS platform. Many webmasters still don't realize the value of heading tags when structuring content to rank well in search results. Thanks!


Leave a Reply

This is a gravatar-friendly site, enter your email address to use your gravatar.

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/web site in attribution.