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

Remove Sidebar & Gap from Only Homepage

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #11  
Old 07-17-2013, 01:17 AM
 
liamb2001 liamb2001 is offline
 

eXpert
  
Join Date: May 2006
Posts: 216
 

Default Re: Remove Sidebar & Gap from Only Homepage

not quite sure what you mean by this exactly if im honest mate ?

Quote:
Originally Posted by philrisk
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
__________________
X-Cart Version 4.55
Reply With Quote
  #12  
Old 07-17-2013, 01:18 AM
 
liamb2001 liamb2001 is offline
 

eXpert
  
Join Date: May 2006
Posts: 216
 

Default 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}
__________________
X-Cart Version 4.55
Reply With Quote
  #13  
Old 07-17-2013, 01:24 AM
 
philrisk philrisk is offline
 

X-Adept
  
Join Date: Jul 2009
Location: Newcastle upon Tyne, UK
Posts: 412
 

Default Re: Remove Sidebar & Gap from Only Homepage

just remove that part then.
__________________
Live with Gold 4.5.1
Dedicated Linux server
MaxCDN 4 pull zones
Dedicated SSL

Reply With Quote
  #14  
Old 07-17-2013, 01:26 AM
 
philrisk philrisk is offline
 

X-Adept
  
Join Date: Jul 2009
Location: Newcastle upon Tyne, UK
Posts: 412
 

Default Re: Remove Sidebar & Gap from Only Homepage

Quote:
Originally Posted by liamb2001
not quite sure what you mean by this exactly if im honest mate ?

Here is my oart of that page.

PHP Code:
{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'}
<
div id="left-bar">
  {include 
file="customer/left_bar.tpl"}
</
div>
{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if} 
__________________
Live with Gold 4.5.1
Dedicated Linux server
MaxCDN 4 pull zones
Dedicated SSL

Reply With Quote
  #15  
Old 07-17-2013, 01:35 AM
 
liamb2001 liamb2001 is offline
 

eXpert
  
Join Date: May 2006
Posts: 216
 

Default 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 --> ?
__________________
X-Cart Version 4.55
Reply With Quote
  #16  
Old 07-17-2013, 01:37 AM
 
philrisk philrisk is offline
 

X-Adept
  
Join Date: Jul 2009
Location: Newcastle upon Tyne, UK
Posts: 412
 

Default Re: Remove Sidebar & Gap from Only Homepage

Quote:
Originally Posted by liamb2001
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 --> ?

Yes thats at the bottom of the content.tpl page

PHP Code:
{*
$Idcontent.tpl,v 1.1.1.1.2.1 2012/06/22 11:52:58 aim Exp 
vimset ts=2 sw=2 sts=2 et:
*}
<
div id="center">
{if (
$main eq 'cart' and not $cart_empty) or $main eq 'checkout'}
{else}
    {if 
$main neq "help"}
        {if 
$main neq "catalog" or $current_category.category neq ""}
        {include 
file="customer/bread_crumbs.tpl"}
        {/if}
    {/if}
{/if}
  <
div id="center-main" {if $main eq 'product'}style="margin: 0 15px;"{/if}{if $main eq 'error_ccprocessor_error'}style="margin: 0 15px;"{/if}{if $main eq 'wishlist'}style="margin: 0 15px;"{/if}{if $main eq 'customer_bonuses'}style="margin: 0 15px;"{/if}{if $main eq 'orders'}style="margin: 0 15px;"{/if}{if $main eq '403'}style="margin: 0 15px;"{/if}{if $main eq 'address_book'}style="margin: 0 15px;"{/if}{if $main eq 'order_message'}style="margin: 0 15px;"{/if}{if $manufacturerid eq '0'}style="margin: 0 15px;"{/if}{if $main eq 'giftcert'}style="margin: 0 15px;"{/if}{if $main eq 'register'}style="margin: 0 15px;"{/if}{if $main eq 'help'}style="margin: 0 15px;"{/if}{if $main eq 'authentication'}style="margin: 0 15px;"{/if}{if $main eq 'pages'}style="margin: 0 15px;"{/if}{if $main eq 'wordpress'}style="margin: 0 15px;"{/if}{if $cat eq '0'}style="margin: 0 15px;"{/if}>
    {if !(
$main eq "catalog" and $current_category.category eq "")}
        {include 
file="customer/evaluation.tpl"}
    {/if}
<!-- 
central space -->
{if 
$cat ne "0"}{if $main ne 'checkout'}{if $main ne 'cart'}{if $cat ne "264"}{if $cat ne "370"}{if $cat ne "352"}{if $cat ne "312"}{if $cat ne "313"}{if $cat ne "314"}{if $cat ne "315"}{if $cat ne "316"}{if $cat ne "317"}{if $cat ne "318"}{if $cat ne "319"}
<
div style=" background: #ff0000; width: 100%; height: 50px; padding: 0;margin: 10px 0;"><a href="Sale-Shop/"><img src="{$ExtraImagesDir}/summersalethin.gif" hspace="0" vspace="0"></a></div>
{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}

    {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"}
        {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}

      {include 
file="customer/dialog_message.tpl"}
      
      {*** 
On Sale :: alteredcart.com ***}
{if 
$active_modules.On_Sale}
{include 
file="modules/On_Sale/onsale_dialog.tpl"}{/if}
{*** 
END On Sale :: alteredcart.com ***}

      {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}
      
      {*
TheXcartStorePredictive Search*} 
{if 
$txs_see_also}{include file="modules/Predictive_Search/see_also_you_mean_section.tpl" suggestions=$txs_see_also type='see_also'}{/if} 
{if 
$txs_did_you_mean}{include file="modules/Predictive_Search/see_also_you_mean_section.tpl" suggestions=$txs_did_you_mean type='did_you_mean'}{/if}
{*/
TheXcartStorePredictive Search*}

      {include 
file="customer/home_main.tpl"}
      
      {if 
$active_modules.Recently_Viewed}
  {include 
file="modules/Recently_Viewed/section.tpl"}
{/if}

    {/if}
<
div class="clearing"></div>
<
div class="hp_copy">
{if 
$cat eq "0"}
        <
h1 style="font-size:16px; padding-left:0px; margin-bottom:5px; margin-top:0;">Gifts for Every Occasion</h1>
        
Here at Collectables we aim to stock the widest possible selection of gifts and gift ideas for a wide range of people and occasionsOur collection includes watches from brands such as <a href="Watches/department-all-watches/brand-ice-watch/">Ice Watches</a> and a wide selection of classic gifts such as <a href="Fashion/department-handbags/brand-kipling/">Kipling bags</a>, <a href="Gifts/department-plush/brand-charlie-bears/">Charlie bears</a>, <a href="Candles/department-candles/brand-yankee-candle/">Yankee Candles</a> and so much moreStart browsing today to find that perfect gift for that someone special.{/if}
</
div>

<!-- /
central space -->

  </
div><!-- /center -->
</
div><!-- /center-main -->

{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'}
<
div id="left-bar">
  {include 
file="customer/left_bar.tpl"}
</
div>
{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if}{/if} 
__________________
Live with Gold 4.5.1
Dedicated Linux server
MaxCDN 4 pull zones
Dedicated SSL

Reply With Quote
  #17  
Old 07-17-2013, 02:14 AM
 
liamb2001 liamb2001 is offline
 

eXpert
  
Join Date: May 2006
Posts: 216
 

Default 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
__________________
X-Cart Version 4.55
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 04:42 AM.

   

 
X-Cart forums © 2001-2020