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)
-   -   How to have no left.tpl on home and product detail pages? (https://forum.x-cart.com/showthread.php?t=60860)

lostdog 09-11-2011 05:43 PM

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.

Cpt.Crashtastic 09-12-2011 01:40 AM

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.

balinor 09-12-2011 04:23 AM

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}

lostdog 09-12-2011 09:49 AM

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.

balinor 09-12-2011 11:48 AM

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.

Eyeglasses Expert 09-28-2011 03:46 AM

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?


All times are GMT -8. The time now is 07:56 PM.

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