Skip to content

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!

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

Topic: Mambo Tutorials
Tagged as: document outline, hack, header tags, Mambo, page titles, PHP, search engine, search engine optimisation, title tags

Share on FriendFeed

{ 1 comment… read it below or jump to the comment form to share your opinion }

  1. 1 Header Tags September 12th, 2008 at 12:29 am

    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 Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
Any comments that look like spam will be treated as spam - this includes SEO titles and use of spurious keywords.

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