Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Sidebox on one ez page ID only

Sidebox on one ez page ID only

Views: 778

Results 1 to 4 of 4
28 Feb 2012, 6:30 AM
#1
buildingblocks avatar

buildingblocks

Totally Zenned

Join Date:
Jun 2008
Posts:
629
Plugin Contributions:
0

Sidebox on one ez page ID only

I've been searching for the solution to display the banner-box sidebox on one ezpage only. Nothing I have found shows the solution for this. How can this be altered? This is the page code

<?php

/**

 * banner_box sidebox - used to display "square" banners in sideboxes

 *

 * @package templateSystem

 * @copyright Copyright 2003-2005 Zen Cart Development Team

 * @copyright Portions Copyright 2003 osCommerce

 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0

 * @version $Id: banner_box.php 3133 2006-03-07 23:39:02Z ajeh $

 */



// test if box should display

  $show_banner_box = true;

  if (SHOW_BANNERS_GROUP_SET7 == '') {

    $show_banner_box = false;

  }



  if ($show_banner_box == true) {

    $banner_box[] = TEXT_BANNER_BOX;

    $banner_box_group= SHOW_BANNERS_GROUP_SET7;



    require($template->get_template_dir('tpl_banner_box.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_banner_box.php');



// if no active banner in the specified banner group then the box will not show

// uses banners in the defined group $banner_box_group

    if ($banner->RecordCount() > 0) {



      $title =  BOX_HEADING_BANNER_BOX;

      $title_link = false;

      require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);

    }

  }

?>

thank you

28 Feb 2012, 6:04 PM
#2
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Sidebox on one ez page ID only

You could try changing

$show_banner_box = true; 

to something like:

if($_GET['main_page']=='page' and $_GET['id']=='12')
{
$show_banner_box = true; 
}

you'll need to change the '12' to match the page you want the box to show up on. I haven't tested that but it should work barring typos!

28 Feb 2012, 11:46 PM
#3
buildingblocks avatar

buildingblocks

Totally Zenned

Join Date:
Jun 2008
Posts:
629
Plugin Contributions:
0

Re: Sidebox on one ez page ID only

Thanks for responding Nick. It's appreciated.

I would have tried your suggestion but I already ended up doing the ezpage stylesheet method, which I had forgotten about.

28 Feb 2012, 11:52 PM
#4
niccol avatar

niccol

Totally Zenned

Join Date:
Apr 2009
Posts:
2,138
Plugin Contributions:
1

Re: Sidebox on one ez page ID only

Great. Glad you got it working.