Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Show News Title instead of description on the Home Page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-14-2009, 08:58 AM
 
matallen matallen is offline
 

Advanced Member
  
Join Date: Nov 2008
Posts: 78
 

Default Show News Title instead of description on the Home Page

I'd like to only show the Title of a news item on the homepage rather than the description. If possible it might be nice to show a small snippet of of the description as well - Can anyone point me in the right direction on this? Thanks so much!
__________________
Matt Allen
Xcart Gold v4.2.2
LINUX - Apache
PHP 5.2.9 / MySQL 5.0.81-community
Reply With Quote
  #2  
Old 09-14-2009, 09:40 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,191
 

Default Re: Show News Title instead of description on the Home Page

Look at today_news.tpl - {$news_message.body|truncate:150} the number represents how many character to show from the news itself. Try {$news_message.subject} for title
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote

The following user thanks cflsystems for this useful post:
matallen (09-15-2009)
  #3  
Old 09-15-2009, 04:31 AM
 
matallen matallen is offline
 

Advanced Member
  
Join Date: Nov 2008
Posts: 78
 

Default Re: Show News Title instead of description on the Home Page

Thanks so much! That worked great!
__________________
Matt Allen
Xcart Gold v4.2.2
LINUX - Apache
PHP 5.2.9 / MySQL 5.0.81-community
Reply With Quote
  #4  
Old 03-10-2010, 05:45 AM
 
RSprinkel RSprinkel is offline
 

Newbie
  
Join Date: Feb 2010
Posts: 8
 

Default Re: Show News Title instead of description on the Home Page

I have been trying to get this working on my site and this method is not working. Is there anything else I Can try?

Thanks much in advance.
__________________
XCart Gold Version 4.3.1
Reply With Quote
  #5  
Old 03-11-2010, 04:06 AM
 
matallen matallen is offline
 

Advanced Member
  
Join Date: Nov 2008
Posts: 78
 

Default Re: Show News Title instead of description on the Home Page

Quote:
Originally Posted by RSprinkel
I have been trying to get this working on my site and this method is not working. Is there anything else I Can try?

Thanks much in advance.

I see that you are using v 4.3.x . . . it appears they have changed the template employed on the home page to display news.

They are now using: skin1/customer/news.tpl

Edit line 25 to look like this:

Code:
{$news_message.body|truncate:150}<br /><br />
__________________
Matt Allen
Xcart Gold v4.2.2
LINUX - Apache
PHP 5.2.9 / MySQL 5.0.81-community
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 06:22 PM.

   

 
X-Cart forums © 2001-2020