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

Limiting content to home.php

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 11-12-2003, 11:03 AM
 
lixy lixy is offline
 

Advanced Member
  
Join Date: Apr 2003
Posts: 41
 

Default Limiting content to home.php

Does anyone have any idea how I can limit the news.tpl to be included on the home.tpl only when the main home.php page is being viewed?
Reply With Quote
  #2  
Old 11-12-2003, 04:39 PM
  TelaFirma's Avatar 
TelaFirma TelaFirma is offline
 

X-Adept
  
Join Date: Nov 2002
Location: North Carolina USA
Posts: 930
 

Default

Code:
{if $main eq "catalog" and $current_category.category eq ""} { include file="news.tpl" } {/if}
Reply With Quote
  #3  
Old 11-13-2003, 05:57 AM
 
lixy lixy is offline
 

Advanced Member
  
Join Date: Apr 2003
Posts: 41
 

Default

Thanks for your reply. I solved this issue by adding to the home_main.tpl:

Code:
{include file="news.tpl"}

Code:
{elseif $main eq "catalog" and $current_category.category eq ""} {include file="customer/main/welcome.tpl" f_products=$f_products} {include file="news.tpl"}

This works perfectly however do you think I would be better off using the method you posted?[/code]
Reply With Quote
  #4  
Old 11-13-2003, 03:02 PM
  TelaFirma's Avatar 
TelaFirma TelaFirma is offline
 

X-Adept
  
Join Date: Nov 2002
Location: North Carolina USA
Posts: 930
 

Default

um.... they are the same thing. Look at the if statement that controls it.
Reply With Quote
  #5  
Old 11-13-2003, 04:27 PM
 
jeeya jeeya is offline
 

X-Adept
  
Join Date: May 2003
Location: USA
Posts: 807
 

Default

what about displaying certain tpl's on contact, terms and contions section?

I tried something like

{if $section="contact"}
{include file = "default.tpl}

it didn't work
Reply With Quote
  #6  
Old 11-14-2003, 05:55 AM
  TelaFirma's Avatar 
TelaFirma TelaFirma is offline
 

X-Adept
  
Join Date: Nov 2002
Location: North Carolina USA
Posts: 930
 

Default

Code:
{if $main eq "help" and $section eq "contactus"} {include file="directory/template.tpl} {/if} {if $main eq "help" and $section eq "conditions"} {include file="directory/template.tpl} {/if}
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 02:48 PM.

   

 
X-Cart forums © 2001-2020