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

How to have no left.tpl on home and product detail pages?

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 09-11-2011, 05:43 PM
 
lostdog lostdog is offline
 

Advanced Member
  
Join Date: Aug 2011
Posts: 44
 

Default How to have no left.tpl on home and product detail pages?

How can I get the left_bar.tpl to not show up on homepage and product detail page. It probably involves integrating script variables into the template using Smarty expressions on skin/common_files/customer/home.tpl and skin/2-columns/customer/main/product_detail.tpl

And I am just not that good with them.
__________________
X-Cart/Gold 4.4
Factory Direct Hardware
Reply With Quote
  #2  
Old 09-12-2011, 01:40 AM
 
Cpt.Crashtastic Cpt.Crashtastic is offline
 

eXpert
  
Join Date: Jan 2006
Posts: 219
 

Default Re: How to have no left.tpl on home and product detail pages?

Code:
{*<div id="left-bar"> {include file="customer/left_bar.tpl"} </div>*}

comment out as above in content.tpl. Use webmaster mode to find the correct one. You will need to adjust the css accordingly. If you use Safari with developer tools its very easy to see what you need to change. One bit at a time, mind you, as you will end up in a right old mess.
__________________
Xcart 4.4.?
Xcart Next
Litecommerce with Drupal
http://www.corbywebworx.com

Custom Mods, Hosting and Support for Xcart-Next and LiteCommerce
Reply With Quote
  #3  
Old 09-12-2011, 04:23 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: How to have no left.tpl on home and product detail pages?

That will hide it everywhere. You need to use an {if} statement instead:

{if $main eq "catalog" and $current_category.category eq "" or $main eq "product"}{else}{include file="customer/left_bar.tpl"}
{/if}
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote

The following user thanks balinor for this useful post:
lostdog (09-12-2011)
  #4  
Old 09-12-2011, 09:49 AM
 
lostdog lostdog is offline
 

Advanced Member
  
Join Date: Aug 2011
Posts: 44
 

Default Re: How to have no left.tpl on home and product detail pages?

balinor,

Worked great. Thank you.

What would be the best way to go about getting rid of the #left-bar width 210px padding on home and product detail pages only? If I edit via css I lose it on all pages.
__________________
X-Cart/Gold 4.4
Factory Direct Hardware
Reply With Quote
  #5  
Old 09-12-2011, 11:48 AM
 
balinor balinor is offline
 

Veteran
  
Join Date: Oct 2003
Location: Connecticut, USA
Posts: 30,253
 

Default Re: How to have no left.tpl on home and product detail pages?

You'd need to use the same {if} statement to give the main block (the right hand one) a different css class.
__________________
Padraic Ryan
Ryan Design Studio
Professional E-Commerce Development
Reply With Quote
  #6  
Old 09-28-2011, 03:46 AM
 
Eyeglasses Expert Eyeglasses Expert is offline
 

eXpert
  
Join Date: May 2010
Posts: 307
 

Default Re: How to have no left.tpl on home and product detail pages?

Quote:
Originally Posted by balinor
You'd need to use the same {if} statement to give the main block (the right hand one) a different css class.

how to do, please?
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 02:40 PM.

   

 
X-Cart forums © 2001-2020