View Single Post
  #3  
Old 07-14-2009, 02:27 PM
  Victor D's Avatar 
Victor D Victor D is offline
 

X-Adept
  
Join Date: Aug 2008
Posts: 643
 

Default Re: News posts on home page

add in the end of modules/News_Management/func.php
Code:
function insert_news_get_num($lngcode) { return array_slice(func_news_get($lngcode), 0, 3);}



then in skin1/customer/news.tpl change
Code:
{if $is_news_exist} {capture name=menu} <div class="news item"> {include file="today_news.tpl"} </div>

to

Code:
{if $is_news_exist} {capture name=menu} {if $news_message eq ""} <div class="news item">{$lng.txt_no_news_available}</div> {else} {insert name="gate" func="news_get_num" assign="all_news" lngcode=$shop_language} {section name=newsloop loop=$all_news} <div class="news item"> <strong> {$all_news[newsloop].date|date_format:$config.Appearance.date_format}</strong><br /> {$all_news[newsloop].body}<br /> </div> {/section} <br /> {if $usertype eq "C"} <a href="news.php" class="small-link prev-news">{$lng.lbl_previous_news}</a> {/if} {/if}

This should work, though I didn't tested it.
__________________
Regards,
Victor Dubiniuk

X-Cart Skins Store
- twenty two different skins for 4.1.x and 4.2.x;
- 4.3.x compatible versions are available;
- refresh you store now!

Smart menu X-Cart add-on for 4.1.8 - 4.3.x
Featured Products Slide Show X-Cart add-on for 4.1.8 - 4.3.x
Reply With Quote