| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
news posting | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
news posting
I am learning to use the news management and want the news to post on that right hand column box, but only show the first couple of sentences and give customers the option of clicking on it to read more. Instead the whole article post with a very long narrow scroll to read it all. Is it possible to make it only show the first paragraph or less with a link or is News Man reallly just for email subscriptions?
|
|||||||
#2
|
|||||||
|
|||||||
Here's what I use:
open up today_news.tpl and replace this: {$news_message.body} with this: {$news_message.body|truncate:114:"...":true}...read more change the truncate value to shrink or expand as you like.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||
|
|||||||
news management
THanks. that worked just fine.
|
|||||||
#4
|
|||||||
|
|||||||
This is also what I want to know.
It is strange that I search for keyword "news" in this forum and get nothing back. It seems phpBB does not store news as the searchable word. Thanks a lot.
__________________
version 4.1.1 |
|||||||
#5
|
|||||||||
|
|||||||||
Nice! I like that...
__________________
Carl Tice X-Cart 4.6.6 X-Payments 3.0 ReBOOT 3.4.1 PHP 5.6.30 MySQL 5.6.35 Linux 2.6.32-042stab120.18 ionCube PHP Loader v4.7.3 Perl 5.10.1 |
|||||||||
#6
|
|||||||
|
|||||||
Re: news posting
thank you as well, I needed help with this and it worked perfect
__________________
Jolyn X-cart gold 4.1.2 |
|||||||
#7
|
|||||||
|
|||||||
Re: news posting
As balinor explained above you can truncate the news. Now does anyone know if it is possible to display multiple news items? When I add a message it just displays the newest message, I would like to show the latest 5 messages.
Thanks
__________________
Joshua X-Cart v4.1.5 |
|||||||
#8
|
|||||||
|
|||||||
Re: news posting
my solution is neither elegant nor automated... I made a new .tpl and called it mm_news.tpl
I simply hardcoded my news items... Code:
and then in news.tpl, replaced {include file="today_news.tpl"} with the new file. This is brute force, but my news items are EXACTLY what I want. Links exactly what I require.
__________________
xcart 4.5.4 gold+ w/x-payments 1.0.6; xcart gold 4.4.4 |
|||||||
#9
|
|||||||
|
|||||||
Re: news posting
Here is what I did, you can check out the final product at:
www.techcentrichomes.com I changed the news list so that it shows 5 news articles in the news box. It truncates the news article, it shows the news article title, and then it links to the full news story with an anchor so it goes directly to the news article the user clicked on. It works really nice and it is easy to do. in /modules/news_management/func.php: Find this: Code:
and change the 1 to how ever many you want to show on the main page (I used 5) Then change skin1/today_news.tpl. I have included the entire page here. I also have an image before each news item. Also, I put in an anchor in news archive so when you click on the news article, it goes directly to the news article they clicked on. Code:
Here is my skin1/modules/news_management/news_archive.tpl to show how to add the anchor on that page: Code:
Let me know if you have any questions or problems. Good luck!
__________________
Mike Kenzie X Cart Gold Ver. 4.1.3 X-RMA X-AOM X-Product Comparison |
|||||||
#10
|
|||||||
|
|||||||
Re: news posting
Thanks for the replies I like your approach Mike looks like I will have to wait till I upgrade to 4.1. the files you reference either dont exsist on the 4.0 branch or are quite different.
Thanks Again
__________________
Joshua X-Cart v4.1.5 |
|||||||
|
|||
X-Cart forums © 2001-2020
|