| MosTree and Search Engine Optimization Part 2 |
|
| Friday, 02 February 2007 | |
|
A while ago, we talked about how to make MosTree more Search Engine Friendly. Well, we have a Part 2 to that article, this time dealing with the way the word "Root" appears in the directory homepage and the titles for the inside page are simply the name of the category. Looking for something more descriptive and full of keywords?
We have a small hack that may help. This will give you the ability to changes the page titles to something more Search Engine Friendly.
A word of caution - you will need to open the mtree.php and make the edits yourself in three places.
On line 223 change:
A final word of warning:
Set as favorite Bookmark
Email This
Comments (8)
![]() written by skyjuice, February 07, 2007
did u have hack for bluetree temlate?
written by Onsite IT Resources, September 29, 2007
This is a great tip, I will most definitely add this to my 'to do' list!!
One question I have is... how can you change the title on a more granular level? For example, if I want the title tag to be different for different categories how would I go about doing that? For example, if location based, and service oriented, I would not want "appliance repair" or "lawn care" to cross over into every category. How could you add the actual category 'theme' to that specific category and not others? i.e. title tags for geographical based service index: San Diego - Lawn Care and Grass Mowing Services Dallas - Lawn Care and Grass Mowing Services but then also have a separate category with titles... San Diego - Small Engine Repair and Maintenance Dallas - Small Engine Repair and Maintenance These would be two separate categories etc... So would you add the cat_name variable to the page title string so listings in that specific category would also have the category following the "location" which is also the url? I think that would work, but wanted to see what you guys though... By the way, your site is great!! Matt written by ahmad, October 23, 2007
Hi
Could you please help me to solve this problem on mosets tree search engine . When i want to search "plumbing" instead search "i am looking for plumber" when i do that does not works. Thanks. written by nenesio, December 22, 2007
There is a much better Hack, For example using mosets tree for car sales. As explained here would look something like this
Directory - Honda - Site Name More SEO would look something like this Buying your Honda Comfortable in shares - Site name First you will includes / joomla.php find this function setPageTitle( $title=null ) { if (@$GLOBALS['mosConfig_pagetitles']) { $title = trim( htmlspecialchars( $title ) ); $title = stripslashes($title); $this->_head['title'] = $title ? $GLOBALS['mosConfig_sitename'] . ' - '. $title : $GLOBALS['mosConfig_sitename']; } } chage to : function setPageTitle( $title=null ) { if (@$GLOBALS['mosConfig_pagetitles']) { $title = trim( htmlspecialchars( $title ) ); $this->_head['title'] = $title ? $title . ' - ' . $GLOBALS['mosConfig_sitename'] : $GLOBALS['mosConfig_sitename']; } } Now you will mtree.php # Set Page Title if ( $cat_id == 0 ) { $mainframe->setPageTitle( $_MT_LANG->ROOT ); $cat->cat_allow_submission = $mtconf->get('allow_listings_submission_in_root'); } else { $mainframe->setPageTitle( html_entity_decode_utf8($cat->cat_name) ); } change to : # Set Page Title if ( $cat_id == 0 ) { $mainframe->setPageTitle( 'Descargas Gratis de Software' ); $cat->cat_allow_submission = $mt_allow_listings_submission_in_root; } else { //added for extra cats $database->setQuery( "SELECT cat_id, cat_name, cat_parent, cat_published FROM #__mt_cats WHERE cat_id='".$cat->cat_parent."' AND cat_published='1' LIMIT 1" ); $database->loadObject( $cat2 ); $database->setQuery( "SELECT cat_id, cat_name, cat_parent, cat_published FROM #__mt_cats WHERE cat_id='".$cat2->cat_parent."' AND cat_published='1' LIMIT 1" ); $database->loadObject( $cat3 ); if($cat2!='' && $cat3!=''){ # Set Page Title $pagepathway = ( 'Buying your ' . $cat3->cat_name . ' : ' . $cat2->cat_name . ' : ' . $cat->cat_name. ' Comfortable in shares' ); }elseif($cat2!='' && $cat3==''){ # Set Page Title $pagepathway = ( 'DBuying your ' . $cat2->cat_name . ' : ' . $cat->cat_name. ' Comfortable in shares' ); }elseif($cat2=='' && $cat3 ==''){ # Set Page Title $pagepathway = ( 'Buying your ' . $cat->cat_name. ' Comfortable in shares' ); } $mainframe->setPageTitle( $pagepathway ); #$mainframe->setPageTitle( $cat->cat_name ); } But also it is intended that the listing page has seo, find this : # Set Page Title $mainframe->setPageTitle( html_entity_decode_utf8($link->link_name) ); and change to : # Set Page Title $mainframe->setPageTitle( 'Buying your ' . $link->link_name. ' Comfortable in shares' ); This is the listing page daria something like this: Buying your HONDA ACCORD 2008 Comfortable in shares - Site name this is very very very seo written by nenesio, December 22, 2007
this working en mosets tree 1.5.x and 2.x.x, And to the metas tags description and keywords functions change en joomla.php line 537 and 556 :
$this->_head['meta'][$i][1] = $content .', '. $this->_head['meta'][$i][1]; to $this->_head['meta'][$i][1] = $this->_head['meta'][$i][1] .', '. $content; Write comment
|


