| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Value of $main on home page | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
Value of $main on home page
Hello,
I'd like to find out what the value of the $main variable is when it is displaying the home page -- in short, I want to add a new block that shows on all other pages except for the home page. Or is there an easier way to accomplish this? I really only want to edit this into the templates, and although I'm a Smarty-novice, it seems to me as if this is possible. I'll readily admit I don't quite understand why Bestsellers shows up only on the front page. But I wish I did! Thank you, deb |
|||||||
#2
|
|||||||
|
|||||||
Well, I realized I could check the $location instead of $main, and achieved the new box on exactly the right pages.
So ... I answered my own question. However, I'm still not so sure why the Bestsellers box only shows up on the main page, I don't see anything in the template that tells it not to show up on other pages. Just curious is all ... I like it where it is deb |
|||||||
#3
|
|||||||
|
|||||||
Hi Deb,
If bestsellers are selected then these will show up in all categories unless you have amended the templates to remove it. BTW $main is "" for home page - if you look at customer/home_main.tpl this will make it clear for you.
__________________
ex x-cart guru |
|||||||
#4
|
|||||||
|
|||||||
Funky:
"Clear" is a relative thing with me and Smarty... Thank you for the tips! I see now Best Sellers changes depending on which category you are in. Since I only had a couple things in the database, it appeared to me that it went away altogether. That's a real nice feature. deb (who is having a love-hate relationship with X-Cart this month) |
|||||||
#5
|
|||||||
|
|||||||
Deb
Keep it up - x-cart will reward you.... Well not really but you will grow to love it (and its little flaws!)
__________________
ex x-cart guru |
|||||||
|
|||
X-Cart forums © 2001-2020
|