Forums / Templates, Stylesheets, Page Layout / Sidebox only in contact us page ...

Sidebox only in contact us page ...

Locked

Views: 1,072

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
14 Dec 2007, 3:09 PM
#1
monkeyjr47906 avatar

monkeyjr47906

New Zenner

Join Date:
Nov 2007
Posts:
72
Plugin Contributions:
0

Sidebox only in contact us page ...

Help!!!

I'm trying to have sideboxes appear only in my contact page ...

here is the goofy code that I came up with for my module ...

<?php
/**
 * indexright sidebox
 *
 * @package templateSystem
 * @copyright 2007 Kuroi Web Design
  * @copyright Portions Copyright 2003-2007 Zen Cart Development Team
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: blank_sidebox.php 2007-05-26 kuroi $
 */

  // test if box should display
$show_contactusright_sidebox = false;

if (!($_GET['main_page']==FILENAME_CONTACT_US)) $show_contactusright_sidebox = true;

 if ($show_contactusright_sidebox == true) {
      require($template->get_template_dir('tpl_indexright_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_indexright_sidebox.php');
      $title =  BOX_HEADING_CONTACTUS_SIDEBOX;
      $title_link = false;
      require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
 }

 
?>
14 Dec 2007, 3:13 PM
#2
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Sidebox only in contact us page ...

 $show_contactusright_sidebox = false;

if (!($_GET['main_page']==FILENAME_CONTACT_US)) $show_contactusright_sidebox = true;

 if ($show_contactusright_sidebox == true) {

Why don't you put them all in just one IF?

And your code is saying that: if the page is NOT contact_us then display.

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

14 Dec 2007, 3:49 PM
#3
monkeyjr47906 avatar

monkeyjr47906

New Zenner

Join Date:
Nov 2007
Posts:
72
Plugin Contributions:
0

Re: Sidebox only in contact us page ...

I had a typo (not that it makes a difference) in the first post ...

Help!!!

I'm trying to have sideboxes appear only in my contact page ...

here is the goofy code that I came up with for my module ...

<?php
/**
 * indexright sidebox
 *
 * @package templateSystem
 * @copyright 2007 Kuroi Web Design
  * @copyright Portions Copyright 2003-2007 Zen Cart Development Team
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: blank_sidebox.php 2007-05-26 kuroi $
 */

  // test if box should display
$show_contactusright_sidebox = false;

if (!($_GET['main_page']==FILENAME_CONTACT_US)) $show_contactusright_sidebox = true;

 if ($show_contactusright_sidebox == true) {
      require($template->get_template_dir('tpl_contactusright_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_contactusright_sidebox.php');
      $title =  BOX_HEADING_CONTACTUS_SIDEBOX;
      $title_link = false;
      require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default);
 }

 
?>
14 Dec 2007, 3:55 PM
#4
monkeyjr47906 avatar

monkeyjr47906

New Zenner

Join Date:
Nov 2007
Posts:
72
Plugin Contributions:
0

Re: Sidebox only in contact us page ...

Alright YELLOW!!!!

I'm dead serious about this ... pick and CD on amazon.com and its yours...please no box sets!

I've been beating my head against a wall trying to figure this ba5tard out. (which shows how much of a rookie you're dealing with)

14 Dec 2007, 4:06 PM
#5
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Sidebox only in contact us page ...

Lol

Try this:

 <?php 
/** 
 * indexright sidebox 
 * 
 * @package templateSystem 
 * @copyright 2007 Kuroi Web Design 
  * @copyright Portions Copyright 2003-2007 Zen Cart Development Team 
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 
 * @version $Id: blank_sidebox.php 2007-05-26 kuroi $ 
 */ 

  // test if box should display 
if ($_GET['main_page']==FILENAME_CONTACT_US){
      require($template->get_template_dir('tpl_contactusright_sidebox.php',DIR_WS_TEMPLATE, $current_page_base,'sideboxes'). '/tpl_contactusright_sidebox.php'); 
      $title =  BOX_HEADING_CONTACTUS_SIDEBOX; 
      $title_link = false; 
      require($template->get_template_dir($column_box_default, DIR_WS_TEMPLATE, $current_page_base,'common') . '/' . $column_box_default); 
 } 

  
?>  

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

14 Dec 2007, 4:22 PM
#6
monkeyjr47906 avatar

monkeyjr47906

New Zenner

Join Date:
Nov 2007
Posts:
72
Plugin Contributions:
0

Re: Sidebox only in contact us page ...

worked fine! man i can't tell you how much i appreciate it!

14 Dec 2007, 4:33 PM
#7
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Sidebox only in contact us page ...

You are welcome ^^.

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me