0

I have my category blog override set up to display a single leading article, the latest article to have been published.

I have all the files copied to the correct location, and the override is working as it should however, which part of the blog.php do I need to change so instead of displaying the 'read more' button, it displays the entire article?

Tim Wilkinson
  • 3,761
  • 11
  • 34
  • 62
  • Why would you need to make an override to make it display a single article when that is configurable in the menu links or default options? – Elin Apr 20 '15 at 00:52
  • Is there a way of displaying the latest published full article? – Tim Wilkinson Apr 20 '15 at 05:10
  • Well first, you could simply not use a readmore in your article or put the complete text both before and after the readmore marker. Then configure the menu link for leading = 1 and everything else 0, don't show the category description, set ordering to publish date descending. However I'm assuming that for some reason you need to have readmore sometimes and that is also why you can't do the same text before and after. Correct? – Elin Apr 20 '15 at 05:47
  • I currently have it set up for leading = 1 and everything else 0, however unfortunately I need a read more in each article for other places. I have been playing around with something along the lines of `item->fulltext; ?>` But to no avail. – Tim Wilkinson Apr 20 '15 at 06:17
  • Are you getting an error? Have you tried $item->fulltext – Eoin Oct 18 '16 at 13:38

1 Answers1

1

The template file to change/override is blog_item.php and not blog.php. Look for this line of code:

<?php echo $this->item->introtext; ?>

and change it to:

<?php
echo $this->item->introtext;
echo JHtml::_('content.prepare', $this->item->fulltext);
?>

Removing the Read More button can be done through the options of the menu item you have created for your blog. Set Show "Read More" to Hide.

Mike Feng
  • 803
  • 2
  • 9
  • 19