| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Removing Left Bar from specific static pages | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
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 |
|||||||
#2
|
|||||||||
|
|||||||||
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 |
|||||||||
#3
|
|||||||
|
|||||||
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 |
|||||||
#4
|
|||||||||
|
|||||||||
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 |
|||||||||
#5
|
|||||||
|
|||||||
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 |
|||||||
#6
|
|||||||||
|
|||||||||
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 |
|||||||||
#7
|
|||||||
|
|||||||
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 |
|||||||
#8
|
|||||||||
|
|||||||||
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 |
|||||||||
#9
|
|||||||
|
|||||||
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 |
|||||||
#10
|
|||||||
|
|||||||
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 |
|||||||
|
|||
X-Cart forums © 2001-2020
|