Re: Newsflash module / article alternative "read more" text

This forum is for general questions about extensions for Joomla! 2.5.
Locked
timfish
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Aug 02, 2011 8:23 pm

Re: Newsflash module / article alternative "read more" text

Post by timfish » Wed Aug 03, 2011 10:21 am

Greetings,

I am trying out Joomla 1.6/beez20. My problem is trying to show the alternative "read more" text, as defined in an article, when displaying the article in a Newsflash module.
In Sept 2008, Ray_Carter posted a solution to this which worked for Joomla 1.5. It involved editing the _item.php script in the templ folder of the mod_newsflash module. This worked well.
In Joomla 1.6 the equivalent module seems to be mod_articles_news. However the structure of the _item.php file is slightly different, and the modified script failed to work. I lack the understanding to figure out why.
Can anyone offer any inspiration, alternative or guidance? I would really like to see something more inviting than "Read More" in some of the modules.

Many thanks.
Tim

User avatar
jdockum
Joomla! Apprentice
Joomla! Apprentice
Posts: 34
Joined: Fri Jul 23, 2010 2:31 pm

Re: Newsflash module / article alternative "read more" text

Post by jdockum » Tue Oct 04, 2011 4:18 pm

Hi timfish,

You had the right idea, the _item.php file in mod_articles_news/tmpl is where the content is being created. In the last few lines of the file, just before the '</a>' tag is closed, change $item->linkText to $item->alternative_readmore and it should display your articles with their custom read more text in your news flash module.

Code: Select all

<?php if (isset($item->link) && $item->readmore && $params->get('readmore')) :
	echo '<a class="readmore" href="'.$item->link.'">'.$item->alternative_readmore.'</a>';
endif; ?>

ZachAshley
Joomla! Apprentice
Joomla! Apprentice
Posts: 11
Joined: Sun Nov 16, 2008 2:19 am

Re: Newsflash module / article alternative "read more" text

Post by ZachAshley » Thu Feb 28, 2013 7:42 pm

Excellent solution. This worked in Joomla 3.0 as well.


Locked

Return to “Extensions for Joomla! 2.5”