I am trying to hide my "Wide-Banners" from my index/home page, but I need them to still show on all other pages.
How can I do this?
Thanks in advance!
I am trying to hide my "Wide-Banners" from my index/home page, but I need them to still show on all other pages.
How can I do this?
Thanks in advance!
You can find the banner code you want to control and use something like:
Code:if (!this_is_home_page) { // do banner code here }
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Ok, so I think I need you to be a little more literal with me.
I how do I determine what to put in for "this_is_home_page"?
I made the attempt, but all I managed to do was hide the banner on all pages again.
Thanks for your help and patience.
$this_is_home_page is an existing variable that when on the Home Page would be true and when NOT on the Home Page would be false ...
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Ok, so what am I doing wrong...?
In tpl_main_page.php I changed...
toCode:<?php if (SHOW_BANNERS_GROUP_SET3 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3)) { if ($banner->RecordCount() > 0) { ?> <div id="bannerThree" class="banners"><?php echo zen_display_banner('static', $banner); ?></div> <?php } } ?>
Like I said, that removes the banner from ALL pages. (I also tried wrapping the existing if in the new one, but I got the same result.)Code:<?php if (SHOW_BANNERS_GROUP_SET3 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET3) && !this_is_home_page) { if ($banner->RecordCount() > 0) { ?> <div id="bannerThree" class="banners"><?php echo zen_display_banner('static', $banner); ?></div> <?php } } ?>
Could you try that with the full variable:
$this_is_home_page
rather than just:
this_is_home_page
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Thank you. :) That did the trick.
Thanks for your help and patience!
(I'm learning...)
You are most welcome ... thanks for the update that you have this working now for the home page by using the correct disgnation for the variable to identify the Home Page with:
$this_is_home_page
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
I have the same question, but my banner is in a left side column. I can't see anything in tpl_main_page which relates to this. Can you help?
http://www.jamshop.org.uk
If you did not want to show the Banner box on the Main Page for the:
/includes/modules/sideboxes/banner_box.php
you can copy that to your templates and overrides and use the code in RED to turn it off on the Main Page:
Code:// test if box should display $show_banner_box = true; if ($this_is_home_page || SHOW_BANNERS_GROUP_SET7 == '') { $show_banner_box = false; }
Linda McGrath
If you have to think ... you haven't been zenned ...
Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!
Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
Officially PayPal-Certified! Just click here
Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!
Bookmarks