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? |
Re: Removing Left Bar from specific static pages
where <div id="center-main"> is in content.tpl change it to <div id="center-main"{if $page_data.pageid eq "11"} style="margin-left:30px"{/if}>; you may need to adjust the margin to fit
|
Re: Removing Left Bar from specific static pages
@jonwatson87: Nice website. What mod did you use for colors in product page? The one QT is offering?
Check also this issue in product page: click on "Tell a friend about this product", the form appears and has two orange buttons at the bottom. The left button has no text on it, as I see pushing on it there should be a Cancel text. |
Re: Removing Left Bar from specific static pages
Fantastic! Thank you SO much, Steve @cflsystems. That worked like a charm. Eternally grateful. Hopefully this will help any other newbies encountering the same problem.
@ADDISON - this is actually an iFrame to Spreadshirt.co.uk. I have a shop with them for my T-shirt designs. I just wanted to link to it without having customers leave my website. I'm afraid I don't know what software they use. I'll have to let them know about the form issue. Well spotted. Thanks! |
All times are GMT -8. The time now is 01:00 PM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.