Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Sidebox Overrides cont.?

Sidebox Overrides cont.?

Locked

Views: 1,027

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
20 Nov 2006, 7:23 PM
#1
pensive612 avatar

pensive612

Zen Follower

Join Date:
May 2006
Posts:
313
Plugin Contributions:
0

Sidebox Overrides cont.?

Hey everyone,

in continuing the archived post about controlling sideboxes dependent on the page...

using the code:

if ($_GET['main_page'] == 'index'){
  $show_(my sidebox) = true;
} else {
  $show_(my sidebox) = false;
}

has been working good. but i want to turn a sidebox ON for the main page, and OFF for the product listing pages. it seems they are both considered 'index'

is there a way for me to separate the two?

thanks in advance...

21 Nov 2006, 5:03 AM
#2
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: Sidebox Overrides cont.?

By index do you mean your home page?

If so, there is a variable for this:
$this_is_home_page

22 Nov 2006, 9:34 PM
#3
pensive612 avatar

pensive612

Zen Follower

Join Date:
May 2006
Posts:
313
Plugin Contributions:
0

Re: Sidebox Overrides cont.?

thanks for your help, Ajeh.

i'm basically trying to find a way to differentiate, the index.php page from the index product listing page.

($_GET['main_page'] == 'index')

the product listing page URL is ...index.php?main_page=index&cPath

would it work if i used: ```
($_GET['main_page'] == 'index&cPath')


wondering if i can define that separately from the index page when turning off sideboxes?


i'm guessing your saying to pass that variable... but i'm not sure where to do it...

any advice would be appreciated.

thanks again...
30 Nov 2006, 8:35 PM
#4
plumloopy avatar

plumloopy

New Zenner

Join Date:
Apr 2006
Posts:
66
Plugin Contributions:
0

Re: Sidebox Overrides cont.?

Did you find a solution for this?

PL

30 Nov 2006, 8:58 PM
#5
pensive612 avatar

pensive612

Zen Follower

Join Date:
May 2006
Posts:
313
Plugin Contributions:
0

Re: Sidebox Overrides cont.?

PL,

no unfortunately, i never did. still wondering...

i did use to have a dog that looked exactly like that though!

crazy...

i'll post it if i figure out the answer.

30 Nov 2006, 10:44 PM
#6
plumloopy avatar

plumloopy

New Zenner

Join Date:
Apr 2006
Posts:
66
Plugin Contributions:
0

Re: Sidebox Overrides cont.?

He's a Rhodesian Ridgeback!

For me I don't want the right sidebox to appear on the home page but I do want it in the cat listings and elsewherer - which is opposite of you. The /index trick doesn't work because it affects all pages that call the index. So the following works for me:

Instead of:

/ $flag_disable_right = true; /*

I do this:

/ if (empty($cPath)) $flag_disable_right = true; /*

This bases the column status on the status of the cPath variable (as shown in the address bar of the browser in cat listings). If that cPath variable is empty, the page will NOT display the right column.

Since we want opposite results, you should try this one instead:

/ if (!empty($cPath)) $flag_disable_right = true; /*

If that cPath variable is NOT empty (as in all category pages), the page will NOT display the right column but it will on the home page.

Hope that helps,

-PL

30 Nov 2006, 11:19 PM
#7
pensive612 avatar

pensive612

Zen Follower

Join Date:
May 2006
Posts:
313
Plugin Contributions:
0

Re: Sidebox Overrides cont.?

makes sense to me. should work perfect. thanks for the help..!