Joomla
Joomla Tips and Tricks
#75 - How to add an article title to the Read more... link
|
|
How to add an article title to the “Read more...” link?Ok, so you'd like something fancier than "Read More" - not exactly very descriptive is it? Using template overrides you can achieve a better looking "Read More" link .Find the following 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); And there you have it ... you have a nice edit without actually hacking your core code. This edit will survive a Joomla upgrade :)
Only registered users can write comments!
Powered by !JoomlaComment 3.26
3.26 Copyright (C) 2008 Compojoom.com / Copyright (C) 2007 Alain Georgette / Copyright (C) 2006 Frantisek Hliva. All rights reserved." |
|||||||