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

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

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 07-31-2014, 06:08 AM
 
jp@ewaycorp.com jp@ewaycorp.com is offline
 

Member
  
Join Date: Aug 2009
Posts: 23
 

Default 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.
Reply With Quote
  #2  
Old 07-31-2014, 06:50 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default 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 ""}
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 07-31-2014, 07:06 AM
 
jp@ewaycorp.com jp@ewaycorp.com is offline
 

Member
  
Join Date: Aug 2009
Posts: 23
 

Default 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.
Reply With Quote
  #4  
Old 07-31-2014, 07:08 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default 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
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #5  
Old 08-04-2014, 04:10 AM
 
jp@ewaycorp.com jp@ewaycorp.com is offline
 

Member
  
Join Date: Aug 2009
Posts: 23
 

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

any solution for xcart5 ?
Reply With Quote
  #6  
Old 08-05-2014, 05:45 AM
  tony_sologubov's Avatar 
tony_sologubov tony_sologubov is offline
 

X-Cart team
  
Join Date: Jan 2009
Posts: 2,431
 

Default 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.
__________________
Found a bug in X-Cart? Post it to our bug tracker!
Know how to make X-Cart better? Suggest an idea!
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may 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 09:56 PM.

   

 
X-Cart forums © 2001-2020