| ||||||||||
![]() |
Shopping cart software Solutions for online shops and malls | |||||||||
![]() |
![]() |
|
X-Cart Home | ![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Showing more than 1 News story on the Home page | ||||
![]() |
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
![]() I'm trying to show 5 news message on the home page, but I noticed from the debugging tool that the $news_message only has one story in the array.
In news.php however, there's a new variable called $news_messages which has multiple stories... How can I get access to that $news_messages variable from the home page? I was able to find this thread which talks about exactly what I need, but it doesn't work for 4.4.x http://forum.x-cart.com/showthread.php?t=48437 - looks like it's only valid for 4.3 and 4.2
__________________
X-Cart 4.3.0 Gold |
|||||||
#2
|
|||||||
|
|||||||
![]() anybody got solution for this change?
__________________
www.ChiMassager.com X-cart Version 4.44 www.SEOMarketing30days.com --> Download FREE SEO marketing Ebook (valued $50) Attract more visitors and sales with top 5 most powerful SEO marketing strategies. Converting visitors into buyers, not just traffic! |
|||||||
#3
|
|||||||||
|
|||||||||
![]() The heart of the display appears to be...
Code:
Try adding that to news.tpl checking first if any of the variables have changed between versions.
__________________
Two Separate X-Cart Stores Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series. Integrated with Stone Edge Order Manager + POS Version 4.1.12 Gold (fresh install) - X-AOM - Linux Mods - XCSEO free |
|||||||||
#4
|
|||||||
|
|||||||
![]() it didn't work.
By the way, where are these variables stored? $news_message.date $all_news I mean how do you find the right variable and what do they all mean? Still haven't figured out how this smarty works. Your help is appreciated. Thanks
__________________
www.ChiMassager.com X-cart Version 4.44 www.SEOMarketing30days.com --> Download FREE SEO marketing Ebook (valued $50) Attract more visitors and sales with top 5 most powerful SEO marketing strategies. Converting visitors into buyers, not just traffic! |
|||||||
#5
|
|||||||||
|
|||||||||
![]() I no longer have a copy of 4.0.x to look at, sorry.
__________________
Two Separate X-Cart Stores Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series. Integrated with Stone Edge Order Manager + POS Version 4.1.12 Gold (fresh install) - X-AOM - Linux Mods - XCSEO free |
|||||||||
#6
|
|||||||
|
|||||||
![]() I'm using 4.44 now
__________________
www.ChiMassager.com X-cart Version 4.44 www.SEOMarketing30days.com --> Download FREE SEO marketing Ebook (valued $50) Attract more visitors and sales with top 5 most powerful SEO marketing strategies. Converting visitors into buyers, not just traffic! |
|||||||
#7
|
|||||||||
|
|||||||||
![]() Use webmaster mode - it shows you the available variables and their contents.
---
__________________
X-CART (4.1.9,12/4.2.2-3/4.3.1-2/4.4.1-5)-Gold (CDSEO, Altered-Cart On Sale, BCSE Preorder Backorder, QuickOrder, X-Payments, BCSE DPM Module) |
|||||||||
|
#8
|
|||||||||
|
|||||||||
![]() Quote:
Have you tried this? Code:
I just added the loop from the "light and lucid 2 column" news_archive.tpl and commented out the original call for the one news message. I don't know if it will work or not but probably worth a try.
__________________
Two Separate X-Cart Stores Version 4.4.4 Gold - X-AOM - Vivid Dreams Aquamarine (modified) - Linux Mods - Newest Products - View All -, and a few others. Numerous upgrades from 4.0.x series. Integrated with Stone Edge Order Manager + POS Version 4.1.12 Gold (fresh install) - X-AOM - Linux Mods - XCSEO free |
|||||||||
#9
|
|||||||
|
|||||||
![]() it still didn't work. You are right. Should be copy pasting the loop from news_archive.tpl, but the doesn't work at all.
Added some dummy text inside the loop, but the dummy text didn't show up. So, I guess it didn't even go inside the loop at all.
__________________
www.ChiMassager.com X-cart Version 4.44 www.SEOMarketing30days.com --> Download FREE SEO marketing Ebook (valued $50) Attract more visitors and sales with top 5 most powerful SEO marketing strategies. Converting visitors into buyers, not just traffic! |
|||||||
#10
|
|||||||||
|
|||||||||
![]() This may be obvious, but what we are going to need to do is assign the variable $news_messages somewhere other than news.php.
In modules/News_management/news_manage.php you will see the variable assigned to smarty: Code:
Hope that helps, -Mike
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey XcartGuru X-cart Tutorials | X-cart 5 Tutorials Check out the responsive template for X-cart. |
|||||||||
![]() |
|
Thread Tools | Search this Thread |
|
|
|
|||
X-Cart forums © 2001-2020
|