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

Conditional Help Needed

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 03-20-2005, 01:32 PM
  dalmuti's Avatar 
dalmuti dalmuti is offline
 

eXpert
  
Join Date: Oct 2004
Location: Kansas
Posts: 343
 

Default Conditional Help Needed

Hi,

I am working on a new site and in the customer/home.tpl I have...

{include file="customer/head_sub.tpl"}

But I want to make it a conditional and ONLY show on the home.php page.

I have:

{if $main eq "home"}
{include file="customer/head_sub.tpl"}
{/if}

But, when I use this code, it disappears completely so I know something isn't correct. Can anyone tell me what I'm doing wrong?

Please.....Thanks,

Louise
__________________
Louise

Studio 57 Designs - X-Cart Customization
Providing X-Cart Services since 2004
Hottest Blog Directory - Submit Your Blog for a Free Listing
Reply With Quote
  #2  
Old 03-20-2005, 04:38 PM
 
fuzzy fuzzy is offline
 

Advanced Member
  
Join Date: Jun 2004
Location: oHIo
Posts: 77
 

Default

Ahh, just guessing here,
maybe try this in home.tpl.....

EDIT:
K! I guessed wrong! My Bad!

I'll go back to lurkin..
__________________
X-Cart 4.0.12 Gold
Linux
Reply With Quote
  #3  
Old 03-20-2005, 08:25 PM
  dalmuti's Avatar 
dalmuti dalmuti is offline
 

eXpert
  
Join Date: Oct 2004
Location: Kansas
Posts: 343
 

Default

Thanks for the help....but I tried that and could not get it to work.

Anyone else have a clue?

Louise
__________________
Louise

Studio 57 Designs - X-Cart Customization
Providing X-Cart Services since 2004
Hottest Blog Directory - Submit Your Blog for a Free Listing
Reply With Quote
  #4  
Old 03-20-2005, 08:57 PM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

Code:
{if $main eq "catalog" and $current_category.category eq ""}{include file="customer/head_sub.tpl"}{/if}
Reply With Quote
  #5  
Old 03-21-2005, 05:53 AM
  dalmuti's Avatar 
dalmuti dalmuti is offline
 

eXpert
  
Join Date: Oct 2004
Location: Kansas
Posts: 343
 

Default

Jon,

Does this code go in my home.tpl file? Also, I only have one category, does that make a difference?

Thanks,

Louise
__________________
Louise

Studio 57 Designs - X-Cart Customization
Providing X-Cart Services since 2004
Hottest Blog Directory - Submit Your Blog for a Free Listing
Reply With Quote
  #6  
Old 03-21-2005, 08:23 AM
  Jon's Avatar 
Jon Jon is offline
 

X-Guru
  
Join Date: Oct 2002
Location: Vancouver, Canada
Posts: 4,200
 

Default

That code can go whereever you want the include to appear. Looks like probably you want it in your home.tpl
Reply With Quote
  #7  
Old 03-21-2005, 08:37 AM
  dalmuti's Avatar 
dalmuti dalmuti is offline
 

eXpert
  
Join Date: Oct 2004
Location: Kansas
Posts: 343
 

Default

Thanks Jon

I know it takes time to answer all the questions in the forums and I appreciate each and everyone that does......I try when I have an answer and I am lightyears ahead of where I was 6 months ago, but still have a long way to go.

Thanks again....it worked GREAT!!!

Louise
__________________
Louise

Studio 57 Designs - X-Cart Customization
Providing X-Cart Services since 2004
Hottest Blog Directory - Submit Your Blog for a Free Listing
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 03:44 PM.

   

 
X-Cart forums © 2001-2020