Brewsterware

May 26, 2007

SEO for Joomla

Filed under: Marketing — Joe Brewer @ 3:33 pm

A while ago I spent some money on an ebook (something I rarely do). I was expecting alot for the eighty dollars I had spent. On this occasion I was rewarded with loads of excellent quality information. The ebook was written by Aaron Wall, and for those of you not in the know, he is an expert at SEO.

The ebook is absolutely brilliant – not only does it tell you what to do to get high rankings in the search engines, but it teaches you how to think like an SEO expert. The material is worth at least double what he is selling it for.

I’ve been applying some of the ideas to a Joomla site that I working on and have seen much improvement. The first thing that I did was to find a componant that could rewrite the URLs as the default SEO URLs weren’t really worth switching on, although I beleive that this has been addressed in 1.5. At the time of writing the SEO URLs look like this:

www.domain.com/content/view/12/28/
www.domain.com/component/option,com_glossary/Itemid,32/

Meandering though the Joomla forums, I came across this blog which had several reviews of SEO URL componants. The best of which seems to be Artio’s SEO URL componant. It’s been through quite a few changes recently, most notably is the reduction of database queries which seems to have been the main complaint. I have been using it for a few weeks and it has been performing very well. The only thing that has been annoying me is that everytime you save the main configuration, all of the custom URLs, title tags, keyword and description meta tags get deleted.

As well as rewriting any URL, this componant will let you specify different keywords and descriptions for the meta tags for each page, even if you have used {mospagebreak} to break a document into several pages. However, after losing my custom keywords and descriptions several times (mainly because of development of a custom componant for a hypnosis glossary), I have come up with a patch. It requires a little hacking of core code, but I think its much better than the current way of adding keyword and description meta tags to a document. Here is what to do:

Add this code to the top of mospaging.php which can be found in the mambots/content folder:

function AddKeywords( &$content )
{
global $mainframe;
$mainframe->appendMetaTag( ‘keywords’, $content[1] );
}

function AddDescription( &$content )
{
global $mainframe;
$mainframe->appendMetaTag( ‘description’, $content[1] );
}

Scroll down to this code (roughly line 130)

// page counter
$row->text .= ‘<div class=”pagenavcounter”>’;
$row->text .= $pageNav->writeLeafsCounter();
$row->text .= ‘</div>’;

// page text
$row->text .= $text[$page];

Add the following code after it:

// add keywords to the header
$regex = ‘#{keywords}*(.*?){/keywords}#s’;
$row->text = preg_replace_callback( $regex, ‘AddKeywords’, $row->text );

// add description to the header
$regex = ‘#{description}*(.*?){/description}#s’;
$row->text = preg_replace_callback( $regex, ‘AddDescription’, $row->text );

To use it put the keywords and description in the relevent tags in your content pane like this:

{keywords}here, are, some, keywords{/keywords}

{description}here is the description{/description}

Happy SEOing 🙂

1 Comment

  1. the blogs you talk about are great and very useful, especially SEOBOOK. But if you want to find a really good book about seo for joomla! I’d say Proffesional Joomla!, it’s not only for seo, but that chapter is really good.

    Comment by seo en joomla — November 24, 2008 @ 10:46 am

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress