![]() |
Remove Sidebar & Gap from Only Homepage
Hi can anyone tell me how i would remove the left sidebar from the homepage only please ?
I have changed the code in content.tpl to </div><!-- /center-main --> {if ($main neq 'cart' or $cart_empty) and $main neq 'checkout' and $main ne 'product' and ($main ne "catalog" or $current_category.category ne "")} <div id="left-bar"> {include file="customer/left_bar.tpl"} </div> {/if} at the bottom and it has removed it but with the problem the gap / space is still there...im trying to make it so the featured products on the homepage use the full page width would really appreciate some help |
Re: Remove Sidebar & Gap from Only Homepage
PHP Code:
Add the if statement to the "center-main" div. |
Re: Remove Sidebar & Gap from Only Homepage
worked perfectly mate thanks for taking the time to reply i appreciate it :)
|
Re: Remove Sidebar & Gap from Only Homepage
Quote:
Your welcome. |
Re: Remove Sidebar & Gap from Only Homepage
I just realised that the sidebar is missing from the product page.its showing on the category page but i need it to show on the product page as well, any ideas ?
It must be something to do with this code ? {if ($main neq 'cart' or $cart_empty) and $main neq 'checkout' and $main ne 'product' and ($main ne "catalog" or $current_category.category ne "")} |
Re: Remove Sidebar & Gap from Only Homepage
Yes it looks like you have too many 'and's.
Try something like: {if (($main neq 'cart' or $cart_empty) and $main neq 'checkout') or $main ne 'product' or $cat ne '0'} |
Re: Remove Sidebar & Gap from Only Homepage
nearly that fixed on the product page but also brought it back to the homepage
http://www.modernwatch.co.uk/home.php |
Re: Remove Sidebar & Gap from Only Homepage
Actually some things not right as $main ne 'product' should make it not appear on the product page. I know its not the best way of doing it but this is how I have mine:
{if ($main neq 'cart' or $cart_empty) and $main neq 'checkout'} {if $main neq 'product'} {if $main neq 'authentication'} {if $main neq 'giftcert'} {if $main neq 'help'} {if $main neq 'register'} {if $main neq 'pages'} {if $main neq 'wordpress'} {if $main neq 'order_message'} {if $main neq 'address_book'} {if $main neq 'orders'} {if $main neq 'customer_bonuses'} {if $main neq 'wishlist'} {if $main neq 'error_ccprocessor_error'} {if $main neq '403'} {if $main neq 'survey'} {if $main neq 'surveys'} {if $cat neq '0'} {if $manufacturerid neq '0'} left bar.tpl followed by an equal amount of {/if}s |
Re: Remove Sidebar & Gap from Only Homepage
Try doing it that way just to get the variables right for the pages you want and then we can compress it into one if statement if you want.
|
Re: Remove Sidebar & Gap from Only Homepage
ok will do mate
to confirm you mentioned $main ne 'product' should make it not appear on the product page ? Thats actually correct, the sidebar is NOT appearing on the product page but i want it to. |
Re: Remove Sidebar & Gap from Only Homepage
not quite sure what you mean by this exactly if im honest mate ?
Quote:
|
Re: Remove Sidebar & Gap from Only Homepage
this is my current content.tpl
It works perfectly apart from the fact the sidebar is blank on the product page, i want it to show {* d3c1fbb767932b235accea523d097f560a8eb856, v7 (xcart_4_6_0), 2013-05-03 19:20:57, content.tpl, aim vim: set ts=2 sw=2 sts=2 et: *} <div id="center"> <div id="center-main" {if $cat eq '0'}style="margin: 0 5px;"{/if}> {if $main eq 'cart' or $main eq 'checkout' or $main eq "order_message" or $main eq "order_message_widget"} {include file="customer/evaluation.tpl"} {/if} <!-- central space --> {if ($main eq 'cart' and not $cart_empty) or $main eq 'checkout'} {include file="modules/`$checkout_module`/content.tpl"} {else} {if $main neq "catalog" or $current_category.category neq ""} {include file="customer/bread_crumbs.tpl"} {/if} {if $main ne "cart" and $main ne "checkout" and $main ne "order_message" and $main ne "order_message_widget"} {if $gcheckout_enabled} {include file="modules/Google_Checkout/gcheckout_top_button.tpl"} {/if} {if $amazon_enabled} {include file="modules/Amazon_Checkout/amazon_top_button.tpl"} {/if} {/if} {if $top_message or $alt_content} {include file="customer/dialog_message.tpl"} {/if} {if $active_modules.Banner_System and $top_banners ne '' and not ($main eq 'catalog' and $cat eq '')} {include file="modules/Banner_System/banner_rotator.tpl" banners=$top_banners banner_location='T'} {/if} {if $active_modules.Special_Offers} {include file="modules/Special_Offers/customer/new_offers_message.tpl"} {/if} {if $page_tabs ne ''} {include file="customer/main/top_links.tpl" tabs=$page_tabs} {/if} {if $page_title} <h1>{$page_title|escape}</h1> {/if} {include file="customer/home_main.tpl"} {if $active_modules.Banner_System and $bottom_banners ne ''} {include file="modules/Banner_System/banner_rotator.tpl" banners=$bottom_banners banner_location='B'} {/if} {/if} <!-- /central space --> </div><!-- /center --> </div><!-- /center-main --> {if ($main neq 'cart' or $cart_empty) and $main neq 'checkout' and $main ne 'product' and ($main ne "catalog" or $current_category.category ne "")} <div id="left-bar"> {include file="customer/left_bar.tpl"} </div> {/if} |
Re: Remove Sidebar & Gap from Only Homepage
just remove that part then.
|
Re: Remove Sidebar & Gap from Only Homepage
Quote:
Here is my oart of that page. PHP Code:
|
Re: Remove Sidebar & Gap from Only Homepage
arr i didnt know you could put the if statments all togethert at the end,
so is that your content.tpl file contents ? or the line after </div><!-- /center-main --> ? |
Re: Remove Sidebar & Gap from Only Homepage
Quote:
Yes thats at the bottom of the content.tpl page PHP Code:
|
Re: Remove Sidebar & Gap from Only Homepage
thanks mate, got it working with
{if ($main neq 'cart' or $cart_empty) and $main neq 'checkout' and ($main ne "catalog" or $current_category.category ne "")} really appreciate it thanks :) gonna try this filters thing now :) |
All times are GMT -8. The time now is 06:56 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.