The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.



Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Sun Feb 21, 2010 10:40 am 
Joomla! Intern
Joomla! Intern

Joined: Fri Feb 17, 2006 4:53 am
Posts: 53
Hi Friends,


show few articles in front page using latest news module.i need to add read more link to latest news module for viewing complete articles.is there any chance to show like this. please help me?


Top
 Profile  
 
PostPosted: Tue Feb 23, 2010 7:25 pm 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Tue Feb 23, 2010 4:51 pm
Posts: 63
Let me understand what you want..

you want, that every news that you show in the lates_news module have a read more link after the title ?

example

news 1 read more...
news 2 readmore...


Top
 Profile  
 
PostPosted: Wed Feb 24, 2010 12:16 pm 
User avatar
Joomla! Exemplar
Joomla! Exemplar

Joined: Sat Oct 18, 2008 3:02 am
Posts: 8772
Location: Mars
Hi...

or use Latest News extensions >>> http://extensions.joomla.org/extensions ... atest-news
There are several extensions for make Latest news module with Read more link

hope helps :)


Top
 Profile  
 
PostPosted: Fri Mar 12, 2010 2:11 am 
Joomla! Intern
Joomla! Intern

Joined: Fri Feb 17, 2006 4:53 am
Posts: 53
hi Dert,Ghonjez,

i will show 10 article in particular category using latest news module on front page.basically that category have 400 articles.ai need to place read more link for showing all articles in particular category. any chance to place read more articles link in front page with latest news module. this is my exact problem.please help me.

Thanks in advance


Top
 Profile  
 
PostPosted: Sat Mar 20, 2010 7:49 pm 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Tue Feb 23, 2010 4:51 pm
Posts: 63
ok ....


so you have 1 category shown 10 articles in latest news module .

then you want: that if you click the "read more" link in one of the 10 articles

redirect you to a "blogLayout" of the category Instead see that particular article.

Correct me if I'm wrong

and sorry for my crappy english :-[


Top
 Profile  
 
PostPosted: Mon Mar 22, 2010 9:37 am 
Joomla! Intern
Joomla! Intern

Joined: Fri Feb 17, 2006 4:53 am
Posts: 53
i want to redirect category list


Top
 Profile  
 
PostPosted: Mon Mar 22, 2010 5:20 pm 
User avatar
Joomla! Intern
Joomla! Intern

Joined: Tue Feb 23, 2010 4:51 pm
Posts: 63
OK

I have this result

Image


as you can see rigth below to the XX items there is a "read more link" .



this is what you have to do

first go to yourjoomlapath/modules/mod_latestnews/tmpl

and rename the file default.php to default.php.bak (this is just a way to back up)


create a file and name it default.php

then

paste this code into the "new" default.php file

Code:
<?php // no direct access
defined('_JEXEC') or die('Restricted access'); ?>
<ul class="latestnews<?php echo $params->get('moduleclass_sfx'); ?>">
<?php foreach ($list as $item) :  ?>

   <li class="latestnews<?php echo $params->get('moduleclass_sfx'); ?>">
      <a href="<?php echo $item->link; ?>" class="latestnews<?php echo $params->get('moduleclass_sfx'); ?>">
         <?php echo $item->text; ?></a>
   </li>
<?php endforeach; ?>
<a href="<?php echo JRoute::_(ContentHelperRoute::getCategoryRoute($params->get('catid'), $params->get('secid'))); ?>">
      read more...</a>
</ul>


save and try it

if there is one problem let me now


Top
 Profile  
 
PostPosted: Fri May 14, 2010 8:16 am 
Joomla! Intern
Joomla! Intern

Joined: Fri Feb 17, 2006 4:53 am
Posts: 53
Thanks...! it working fine..


Top
 Profile  
 
PostPosted: Thu Aug 02, 2012 4:38 am 
Joomla! Fledgling
Joomla! Fledgling

Joined: Mon Feb 20, 2012 8:43 am
Posts: 4
Thank you very much for this code which works perfectly on both jabulletine module and native joomla latest news module. But I want one thing more in this code. If there is no news listed in the module or say module is empty, there should be a text like "There is no news for the moment". Right now I can see "read more" link even if there is no news listed. Hope you will solve this for me.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 



Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group