Difference between revisions of "Add article title to read more link"
From Joomla! Documentation
m (Wilsonge moved page Add article title to read more link to J1.5:Add article title to read more link: Move to 1.5 namespace)
Revision as of 07:57, 30 April 2013
How to add an article title to the “Read more...” link?
For this you can use the overrides...
If they are not already there, 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", "frontpage", "section"
Then locate the following files
Copy the files to your template's html folders
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...');
echo JText::sprintf('Read more', $this->item->title);
The “Read more” link should now look like this: Read more: (Article title)