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

Value of $main on home page

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 12-28-2002, 09:29 AM
 
deb deb is offline
 

Advanced Member
  
Join Date: Dec 2002
Location: California
Posts: 60
 

Default 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
Reply With Quote
  #2  
Old 12-28-2002, 01:33 PM
 
deb deb is offline
 

Advanced Member
  
Join Date: Dec 2002
Location: California
Posts: 60
 

Default

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
Reply With Quote
  #3  
Old 12-29-2002, 01:25 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

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
Reply With Quote
  #4  
Old 12-29-2002, 07:37 AM
 
deb deb is offline
 

Advanced Member
  
Join Date: Dec 2002
Location: California
Posts: 60
 

Default

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)
Reply With Quote
  #5  
Old 12-29-2002, 09:36 AM
 
funkydunk funkydunk is offline
 

X-Man
  
Join Date: Oct 2002
Location: Cambridge, UK
Posts: 2,210
 

Default

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
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 04:29 PM.

   

 
X-Cart forums © 2001-2020