Making MosTree More Search-Engine Friendly

Apart from Alledia.com, the most popular site we run is JoomlaYellowPages.com, based on the excellent MosTree directory component from Mosets.com.

 

The site has only been up and running for 4 months, but it has already got some good search engine rankings, positioned as #8 in Google for "Joomla Developers" and #7 in Google for "Joomla Development".

 

We started to kick around some ideas to make the site more search engine friendly and decided to apply some simple changes to MosTree. 

 

One important aspect of SEO is to show the search engines which items on your page are important. Having text inside the <h1> tag (which means a large heading) will indicate that its more important than text inside a <p> tag (which means ordinary paragraph text). The default MosTree files don't include any of these tags. 

 

We altered the core MosTree files, so that:

 

  • The directory name is <h1>. This is given the "component heading" class.
  • Category names are <h2>. They are given the "category heading" class.

Adding the tags is a simple as changing:

        <td class="componentheading"><?php echo $this->_MT_LANG->TITLE ?></td>

to

        <td class="componentheading"><h1><?php echo $this->_MT_LANG->TITLE ?></h1></td> 

 

Assuming that you are using the Bluetree_buiness template to use MosTree as a Yellow Pages, the key files you need to dig into are the following:

 

  • components/com_mtree/templates/Bluetree_business/Page_index.tpl.php   (this controls the directory's frontpage)
  • components/com_mtree/templates/Bluetree/page_subCatIndex.tpl.php  (this controls the titles on the category pages)
  • components/com_mtree/templates/Bluetree_business/sub_listingDetails.tpl.php  (this controls the actual listing page)

If you are using every aspect of MosTree, you will need to change all of the following files:

templates/bluetree/page_advsearchresults.tpl.php
templates/bluetree/page_confirmdelete.tpl.php
templates/bluetree/page_featured.tpl.php
templates/bluetree/page_index.tpl.php
templates/bluetree/page_listalpha.tpl.php
templates/bluetree/page_mostrated.tpl.php
templates/bluetree/page_mostreviewed.tpl.php
templates/bluetree/page_mylisting.tpl.php
templates/bluetree/page_new.tpl.php
templates/bluetree/page_ownerlisting.tpl.php
templates/bluetree/page_popular.tpl.php
templates/bluetree/page_searchresults.tpl.php
templates/bluetree/page_subcatindex.tpl.php
templates/bluetree/page_toprated.tpl.php
templates/bluetree/sub_listingdetails.tpl.php

templates/bluetree_business/page_index.tpl.php
templates/bluetree_business/sub_listingdetails.tpl.php

templates/bluetree_classifieds/page_index.tpl.php
templates/bluetree_classifieds/sub_listingdetails.tpl.php

 

We also made changes to components/com_mtree/language/english.php so that the language was more appropriate. "MosTree" became "Joomla Developers, Designers and Companies" and so on.

 

Finally, the disclaimer: as always, please make these changes on a demo site first. Doing this will probably also require changes to the css files. 

 

Leave a Reply

Your email address will not be published. Required fields are marked *