Enhanced readmore links


The default Joomla "Read More..." link is fine... but as always is room for improvement. Especially SEO wise, but not only. How about to have a more descriptive and compelling "Read more..." link, complete with the article title for example?

The first thing to do is to edit the language file to change the default

DEFINE('_READ_MORE','Read more');

with

DEFINE('_READ_MORE','Read more about ');

From there the next step is depending on what Joomla version you use. For the Joomla 1.0.* the solution is simpler:

Search in theĀ  /components/com_content/content.html.php file for the "_linkInfo" function, and inside of that for this line:

$row->link_text = _READ_MORE;

and replace it with something which better satisfies your needs, as

$row->link_text = _READ_MORE.' "'.$row->title.'"';

For Joomla 1.5.* is a bit more work to do... because others where done this before you ;) This functionality is allready implemented allmost everywhere, but there are couple of views where this is missing, and you can make it to work better. The main place where the feature is still missing is the default item's look in the frontpage view. Here's how you can fix it.

Search for /components/com_content/views/frontpage/tmpl/default_item.php and around lines 130-140 you will find the code you will need to modify:

<a href="<?php echo $this->item->readmore_link; ?>"
class="readon<?php echo $this->item->params->get('pageclass_sfx'); ?>">
<?php if ($this->item->readmore_register) :
echo JText::_('Register to read more...');
elseif ($readmore = $this->item->params->get('readmore')) :
echo $readmore;
else :
echo JText::sprintf('Read more...');
endif; ?></a> 

Use your imagination - I'm confident, you can do wonders here!



Add this page to your favorite Social Bookmarking websites
Reddit! Del.icio.us! Mixx! Free and Open Source Software News Google! Live! Facebook! StumbleUpon! Yahoo! Joomla Free PHP
plugin by VivoCiti.com