Joomla – Link Excerpt Article Title to Full Article


In this article, let’s see in Joomla, how to link an article excerpt title to full article, which is the same as the “Read more…” link.

If you know how to use template file to override the core Joomla functions, in your template folder: create a new folder called ‘html’.
In that folder you create a folder called ‘com_content’.
And in that folder you create the folders called “category”, “homepage”, “section”

Then locate the following files

  • (joomla)/components/com_content/views/category/tmpl/blog_item.php
  • (joomla)/components/com_content/views/homepage/tmpl/default_item.php
  • (joomla)/components/com_content/views/section/tmpl/blog_item.php

Copy the files to your template’s html folders

  • (yourtemplate)/html/com_content/category/blog_item.php
  • (yourtemplate)/html/com_content/frontpage/default_item.php
  • (yourtemplate)/html/com_content/section/blog_item.php

Open these files.
Nearly at the bottom of these files you should be seeing something like:

<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>

Change the line

echo JText::sprintf('Read more...');

into

echo JText::sprintf('Read more', $this->item->title);
Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Technorati
  • Twitter
  • Yahoo! Bookmarks

  1. #1 by Christian Bertin on March 31, 2009 - 12:36 am

    Inconsistency in the folder name in this article.
    “frontpage” is mentioned and earlier in the text it was “homepage”. It should be only “frontpage”.

  2. #2 by elamonii on July 4, 2010 - 1:48 am

    good blog :)

  3. #3 by sophen on July 20, 2010 - 3:23 am

    Hi sir, Please make it linkable all article title in category blog layout display.
    I am waiting to hear from u. cos I need to implement it soon

    thanks

    success all ur work

(will not be published)