X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   Value of $main on home page (https://forum.x-cart.com/showthread.php?t=1055)

deb 12-28-2002 09:29 AM

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

deb 12-28-2002 01:33 PM

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

funkydunk 12-29-2002 01:25 AM

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.

deb 12-29-2002 07:37 AM

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)

funkydunk 12-29-2002 09:36 AM

Deb

Keep it up - x-cart will reward you....

Well not really but you will grow to love it (and its little flaws!) :wink:


All times are GMT -8. The time now is 10:29 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.