![]() |
Hide Left & Right Columns On Specific Page Product.php
My Version: X-Cart version 4.1.10
1. I want to remove or hide the left and right vert menus on pages that display the specific product. Example url: http://www.mysite.com/product.php?productid=32&cat=195&page=1 2. I would also liketo remove them on static & help pages like: http://www.mysite.com/help.php http://www.mysite.com/help.php?section=about I am fine with it everywhere else, so how do you remove them? Where do I edit? What code do I insert or comment out? I am not an expert coder so if possible please be specific like "edit file XXXX and add / or remove this code XXXXX. Thanks Thanks |
Re: Hide Left & Right Columns On Specific Page Product.php
Hi there,
The files you'll need to edit are skin1/customer/home.tpl and skin/customer/home_main.tpl (this is for X-Cart 4, which I'm presuming you're using, you'll need to update your signature so that forum members can help you better). home.tpl is like a 'master' template for laying out each page, with HTML interspersed with Smarty logic, while home_main.tpl basically sets out what should be displayed on home.tpl depending on which section the customer has gone to. To remove the left and right columns for specific pages, the exact code changes are different for X-Cart 4.1 and X-Cart 4.2. Would it be possible to tell me which version you're using? |
Re: Hide Left & Right Columns On Specific Page Product.php
Ok I added my version it was also at the top of the post.
Now I do not want to remove it from all pages just the page that displays the specific product as in the example on my first post and also remove it from the help pages. Any ideas anyone? |
Re: Hide Left & Right Columns On Specific Page Product.php
Open skin1/customer/home.tpl and find the line
Code:
<div id="center-main"> ABOVE this line, insert this code Code:
{if $main eq "pages" or ($main eq "product" and $product["productid"] eq 111)} and replace 111 with your chosen product ID (or you could use the SKU / product code instead: use $product["productcode"] ). now scroll down and find Code:
{include file="poweredby.tpl" } and ABOVE this insert this line: Code:
{/if} |
Re: Hide Left & Right Columns On Specific Page Product.php
Thank you very much for your reply, now I think you understand what i want to do except i may have miss typed what i meant.
1. I basically do not want the left or right columns shows on any pages that display products, not just one specific product. 2. Also I do not want it to show on help pages or custom pages i create. Thanks |
Re: Hide Left & Right Columns On Specific Page Product.php
Hi there,
In that case, just change the code from my previous post: Code:
{if $main eq "pages" or ($main eq "product" and $product["productid"] eq 111)} to: Code:
{if $main eq = "pages" or $main eq "product"} |
Re: Hide Left & Right Columns On Specific Page Product.php
That code setup did not workI get errors.
If this helps I have a 7dana template, and an image mod and below I have posted my home.tpl code: Code:
{* $Id: home.tpl,v 1.88.2.11 2007/08/08 13:51:54 max Exp $ *} |
Re: Hide Left & Right Columns On Specific Page Product.php
Where you have the line:
Code:
<!-- main area --> replace it with Code:
<!-- main area --> then below that find the line Code:
{include file="rectangle_bottom.tpl" } and replace it with Code:
{/if} |
All times are GMT -8. The time now is 05:26 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.