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)
-   -   Limiting content to home.php (https://forum.x-cart.com/showthread.php?t=5203)

lixy 11-12-2003 11:03 AM

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?

TelaFirma 11-12-2003 04:39 PM

Code:

{if $main eq "catalog" and $current_category.category eq ""}
{ include file="news.tpl" }
{/if}


lixy 11-13-2003 05:57 AM

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]

TelaFirma 11-13-2003 03:02 PM

um.... they are the same thing. Look at the if statement that controls it.

jeeya 11-13-2003 04:27 PM

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 :-k

TelaFirma 11-14-2003 05:55 AM

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}



All times are GMT -8. The time now is 11:31 AM.

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