X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Dev Questions (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   How to hide a div block on all pages except home page (https://forum.x-cart.com/showthread.php?t=69726)

jp@ewaycorp.com 07-31-2014 06:08 AM

How to hide a div block on all pages except home page
 
Hi,

I want to hide a block on all pages except homepage. The code will be something like

{if:node.name="#home#"}
<div> Hi </div>
{else:}
<div> Test </div>
{end:}

Can someone please help. Thanks in advance.

cflsystems 07-31-2014 06:50 AM

Re: How to hide a div block on all pages except home page
 
Depends on where this shows. If you need it in the body of the page just include it in skin1/customer/main/welcome.tpl

If it's in the head section you can use

{if $main eq "catalog" and $current_category.category eq ""}

jp@ewaycorp.com 07-31-2014 07:06 AM

Re: How to hide a div block on all pages except home page
 
I am sorry to mention that I am using x-cart 5 version. This code only work on older version of x-cart.

cflsystems 07-31-2014 07:08 AM

Re: How to hide a div block on all pages except home page
 
Oh sorry. I saw 4.1 in your signature and thought you are using XC4

jp@ewaycorp.com 08-04-2014 04:10 AM

Re: How to hide a div block on all pages except home page
 
any solution for xcart5 ?

tony_sologubov 08-05-2014 05:45 AM

Re: How to hide a div block on all pages except home page
 
Hi!

Similar task was covered by webinar: http://kb.x-cart.com/pages/viewpage.action?pageId=7504837#Webinar2-10Apr2014-DesignchangesinX-Cart5(CustomSkinsandWebmasterKitmodulesintro)-2.HowcanIwrapthe<divid="content">onhomepageinto<di vid="homepage">?

Please check out the article and let me know if it helps.

Tony.


All times are GMT -8. The time now is 04:18 AM.

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