Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2008
    Location
    Flint, Michigan
    Posts
    687
    Plugin Contributions
    0

    Default Disable Footer Banner all pages except Home

    I have been trying to disable the banner for footer on all pages except the home or index page. I do not want it to show anywhere else. But have not been able to do it.

    The layout is Banner Display Groups - Footer Position 1 for BannerFour. It is above my actual footer. This is what I input for includes/templates/my_temp/common/tpl_main_page.php.

    HTML Code:
    <?php
     if (SHOW_BANNERS_GROUP_SET4 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET4)) {
      if ($banner->RecordCount() > 0) {
    ?>
    <div id="bannerFour" class="banners"><?php echo zen_display_banner('static', $banner); ?></div>
    <?php
    if (SHOW_BANNERS_GROUP_SET4 == '') {
        $show_banner_box = false;
      }
    if ($this_is_home_page) {
        $show_featured = true;
      } else {
        $show_featured = false;
      }
        }
      }
    ?></td>
    And still showing up. Any suggestions? Kim

  2. #2
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Disable Footer Banner all pages except Home

    You are using the wrong variables in your IF statement ... you need to use:
    $show_banner_box

    and you are using:
    $show_featured
    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!

  3. #3
    Join Date
    Apr 2008
    Location
    Flint, Michigan
    Posts
    687
    Plugin Contributions
    0

    Default Re: Disable Footer Banner all pages except Home

    Quote Originally Posted by Ajeh View Post
    You are using the wrong variables in your IF statement ... you need to use:
    $show_banner_box

    and you are using:
    $show_featured
    I changed it to $show_banner_box and still showing on product pages...

    What else am I missing??

    Thanks,Kim

  4. #4
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Disable Footer Banner all pages except Home

    Sorry, I was not paying attention to what you were really trying to do ...

    In that file, you only need to change the 1 line:
    Code:
     if (SHOW_BANNERS_GROUP_SET4 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET4)) {
    to read:
    Code:
     if ($this_is_home_page && SHOW_BANNERS_GROUP_SET4 != '' && $banner = zen_banner_exists('dynamic', SHOW_BANNERS_GROUP_SET4)) {
    adding what is in red will only let the code run if on the 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!

  5. #5
    Join Date
    Apr 2008
    Location
    Flint, Michigan
    Posts
    687
    Plugin Contributions
    0

    Default Re: Disable Footer Banner all pages except Home

    Perfect!

    Thank you! Kim

  6. #6
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: Disable Footer Banner all pages except Home

    You are most welcome ... thanks for the update that this worked for you ...
    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!

 

 

Similar Threads

  1. v151 Banners show in all pages, except for product pages. Help!
    By AquaticAddiction in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 6 Mar 2014, 05:56 PM
  2. v151 help removing slider banner from every page except home page
    By Johnnycopilot in forum Templates, Stylesheets, Page Layout
    Replies: 16
    Last Post: 13 Mar 2013, 08:42 AM
  3. Banners: How can I show them on all pages EXCEPT home?
    By artjewl in forum Templates, Stylesheets, Page Layout
    Replies: 9
    Last Post: 4 Apr 2012, 03:04 PM
  4. Replies: 0
    Last Post: 12 Feb 2010, 07:10 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR