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? |
Re: Removing Left Bar from specific static pages
try
{if $page_data.pageid eq XX} show this {else} show that {/if} |
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! |
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} |
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. |
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 |
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 |
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
|
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! :) |
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? |
All times are GMT -8. The time now is 12:00 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.