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

Removing Left Bar from specific static pages

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 06-17-2012, 05:51 AM
 
jonwatson87 jonwatson87 is offline
 

Advanced Member
  
Join Date: May 2012
Posts: 32
 

Default Removing Left Bar from specific static pages

Hey guys,

Is there any way to remove the left bar on specific static pages only? I like to keep it there for most of them, but there are a couple where I could really use the full page width.

I'm assuming I need to use an {if} function in one of the page content templates, but how can I ensure that it only affects specific static pages, and not all of them?
__________________
X-Cart Pro 4.5
Reply With Quote
  #2  
Old 06-17-2012, 06:42 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Removing Left Bar from specific static pages

try
{if $page_data.pageid eq XX} show this {else} show that {/if}
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 06-17-2012, 09:22 AM
 
jonwatson87 jonwatson87 is offline
 

Advanced Member
  
Join Date: May 2012
Posts: 32
 

Default Re: Removing Left Bar from specific static pages

Thanks. I'm trying this in /common_files/customer/main/pages.tpl:

{if $page_data.pageid eq "11"}{exclude file="customer/left_bar.tpl"}{else}{include file="customer/left_bar.tpl"}{/if}

Doesn't seem to be working. Am I doing something moronic? Does the exclude function even exist? Haha!
__________________
X-Cart Pro 4.5
Reply With Quote
  #4  
Old 06-17-2012, 09:41 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Removing Left Bar from specific static pages

It won't work like this. You have to do it where the file is included in the first place which is most likely content.tpl in your skin diretcory

{if $page_data.pageid ne "11"}{include file="customer/left_bar.tpl"}{/if}
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #5  
Old 06-17-2012, 09:55 AM
 
jonwatson87 jonwatson87 is offline
 

Advanced Member
  
Join Date: May 2012
Posts: 32
 

Default Re: Removing Left Bar from specific static pages

Gotcha. Apologies for being a total noob!

/books_and_magazines/customer/content.tpl

Right at the bottom we've already got:

{if ($main neq 'cart' or $cart_empty) and $main neq 'checkout'}
<div id="left-bar">{include file="customer/left_bar.tpl"}</div>
{/if}

I've tried various 'or' additions to this, and listing it separately below, but the left bar just doesn't budge.
__________________
X-Cart Pro 4.5
Reply With Quote
  #6  
Old 06-17-2012, 10:05 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Removing Left Bar from specific static pages

{if ($main neq 'cart' or $cart_empty) and $main neq 'checkout' and $page_data.pageid ne "11"}
<div id="left-bar">{include file="customer/left_bar.tpl"}</div>
{/if}

You may also need to clear the cache - cleanup.php
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #7  
Old 06-17-2012, 10:25 AM
 
jonwatson87 jonwatson87 is offline
 

Advanced Member
  
Join Date: May 2012
Posts: 32
 

Default Re: Removing Left Bar from specific static pages

You're an absolute star, with the patience of a God! Thank you.

That worked brilliantly. The left bar is now gone.

However, instead of shifting the page contents over to the left, as hoped, there's now just a white space where the left bar used to be.

http://www.makemecrafts.com/Make-ME-Spreadshirt.html
__________________
X-Cart Pro 4.5
Reply With Quote
  #8  
Old 06-17-2012, 11:23 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default Re: Removing Left Bar from specific static pages

You have to also change the css when column is not showing to allow contents to spread to the left/right
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #9  
Old 06-17-2012, 11:28 AM
 
jonwatson87 jonwatson87 is offline
 

Advanced Member
  
Join Date: May 2012
Posts: 32
 

Default Re: Removing Left Bar from specific static pages

Yeah, just trying to work out how to do that without changing anything else. Seems to use similar css rules for the cart screen. I'm sure I'll be able to work it out.

Thanks!
__________________
X-Cart Pro 4.5
Reply With Quote
  #10  
Old 06-18-2012, 07:45 AM
 
jonwatson87 jonwatson87 is offline
 

Advanced Member
  
Join Date: May 2012
Posts: 32
 

Default Re: Removing Left Bar from specific static pages

Whoops. Nope, failed miserably and messed up something someone had fixed for me by using an old altskin file. *facepalm*

I really need to go away and read up on all this, but can anyone help me out with the CSS changes in the meantime?
__________________
X-Cart Pro 4.5
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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:14 AM.

   

 
X-Cart forums © 2001-2020