If this is your first visit, check our documentation. To post, register or login.
Forums / Templates, Stylesheets, Page Layout / Overriding so that the left hand column dosn't appear on main/home page

Overriding so that the left hand column dosn't appear on main/home page

Locked

Started by helensama on 27 Nov 2007, 1:04 PM · Views: 11,913

Results 1 to 20 of 29
This thread is locked. New replies are disabled.
27 Nov 2007, 1:04 PM
#1
helensama avatar

helensama

New Zenner

Join Date:
Dec 2006
Location:
Northwest Connecticut
Posts:
87
Plugin Contributions:
0

Overriding so that the left hand column dosn't appear on main/home page

Hi,

I would like to not have the left hand column appear for both the home and contact us pages and so I read this article:
Can I turn off the left or right hand column sideboxes for some of my sideboxes for some pages only?

located here https://www.zen-cart.com/tutorials/index.php?article=233 and followed the example so that I have the following:

// the following IF statement can be duplicated/modified as needed to set additional flags
if (in_array($current_page_base,explode(",",'contact_us,main_page')) ) {
$flag_disable_left = true;
}

and it is not working... you can see the zen cart here: http://209.85.30.19/

Does anyone know why this isn't working? For the EZ pages I set up the left hand column is not displayed because I am using the **EZ-Pages Pages to disable left-column in Admin...

Thank you, HelenSama**

27 Nov 2007, 2:56 PM
#2
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Overriding so that the left hand column dosn't appear on main/home page

HelenSama:

Hi,

I would like to not have the left hand column appear for both the home and contact us pages and so I read this article:
Can I turn off the left or right hand column sideboxes for some of my sideboxes for some pages only?

located here https://www.zen-cart.com/tutorials/index.php?article=233 and followed the example so that I have the following:

// the following IF statement can be duplicated/modified as needed to set additional flags
if (in_array($current_page_base,explode(",",'contact_us,main_page')) ) {
$flag_disable_left = true;
}

and it is not working... you can see the zen cart here: http://209.85.30.19/

Does anyone know why this isn't working? For the EZ pages I set up the left hand column is not displayed because I am using the **EZ-Pages Pages to disable left-column in Admin...

Thank you, HelenSama**

Try this:

if ($this_is_home_page) {
$flag_disable_left = true;
}

if (in_array($current_page_base,explode(",",'contact_us')) ) {
$flag_disable_left = true;
}

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

28 Nov 2007, 3:46 PM
#3
helensama avatar

helensama

New Zenner

Join Date:
Dec 2006
Location:
Northwest Connecticut
Posts:
87
Plugin Contributions:
0

Re: Overriding so that the left hand column dosn't appear on main/home page

It worked!!! Thank you!!!!!

28 Nov 2007, 7:09 PM
#4
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Overriding so that the left hand column dosn't appear on main/home page

HelenSama:

It worked!!! Thank you!!!!!

Glad to help

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

14 Dec 2007, 10:51 AM
#5
boghead avatar

boghead

New Zenner

Join Date:
Oct 2007
Posts:
21
Plugin Contributions:
0

Re: Overriding so that the left hand column dosn't appear on main/home page

I'm hoping to do the oposite. I want the right column visible on the main page but switched off on others. The problem is I'll have 15,000 other pages. Is there a way of using a wildcard in specifing (eg cPath=4_??) so I can switch off many with once statement rather that list thousands of pPath=.

I've tried a few variations without success. Any ideas?

Thanks.

14 Dec 2007, 3:10 PM
#6
yellow1912 avatar

yellow1912

Totally Zenned

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

Re: Overriding so that the left hand column dosn't appear on main/home page

Why dont you disable it by default, and only display on main?

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:23 PM
#7
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Overriding so that the left hand column dosn't appear on main/home page

Boghead:

I'm hoping to do the oposite. I want the right column visible on the main page but switched off on others. The problem is I'll have 15,000 other pages. Is there a way of using a wildcard in specifing (eg cPath=4_??) so I can switch off many with once statement rather that list thousands of pPath=.

I've tried a few variations without success. Any ideas?

Thanks.

try this:

if ($current_page_base == 'index' and $cPath > '0' ) {
$flag_disable_right = true;
}

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

15 Dec 2007, 2:39 PM
#8
boghead avatar

boghead

New Zenner

Join Date:
Oct 2007
Posts:
21
Plugin Contributions:
0

Re: Overriding so that the left hand column dosn't appear on main/home page

Thanks guys. I had decided to go the other way and switch it on from a default off so now I can do it either way.

Any ideas on how to change the column width right/left boxes on different pages like the above method?

Thanks again.

15 Dec 2007, 2:52 PM
#9
yellow1912 avatar

yellow1912

Totally Zenned

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

Re: Overriding so that the left hand column dosn't appear on main/home page

Look at the way how ZC uses CSS. for example, you can have login.css which will be loaded on login page. Use it to overwrite the default css and change the width.

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

15 Dec 2007, 3:25 PM
#10
boghead avatar

boghead

New Zenner

Join Date:
Oct 2007
Posts:
21
Plugin Contributions:
0

Re: Overriding so that the left hand column dosn't appear on main/home page

Yes, I've been making a few override css for various places. Is .rightBoxContainer { the label that corresponds to Admin->Configuration->Column Width - Right Boxes? I ask of course since I haven't got it working yet!

Thanks.

15 Dec 2007, 3:28 PM
#11
yellow1912 avatar

yellow1912

Totally Zenned

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

Re: Overriding so that the left hand column dosn't appear on main/home page

Usually I would use firebug to "inspect element" and see which div holding the element, and then I just go ahead and make changes (using webdeveloper add-on)

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

21 Feb 2008, 11:26 AM
#12
claschy avatar

claschy

New Zenner

Join Date:
Feb 2008
Posts:
13
Plugin Contributions:
0

Re: Overriding so that the left hand column dosn't appear on main/home page

Boghead:

I'm hoping to do the oposite. I want the right column visible on the main page but switched off on others. The problem is I'll have 15,000 other pages. Is there a way of using a wildcard in specifing (eg cPath=4_??) so I can switch off many with once statement rather that list thousands of pPath=.

I've tried a few variations without success. Any ideas?

Thanks.

Hi there!

I was wondering if someone could help me with this ^^ . I am also looking to have the right column showing only on the main page.

I have column right - global set to off in Admin and have tried several combinations in tpl_main_page.php but to no avail!

The one result I did get also displayed the column on all the index pages including the ezpages..

Any advice!?

Thanks Claire

29 Feb 2008, 10:27 AM
#14
claschy avatar

claschy

New Zenner

Join Date:
Feb 2008
Posts:
13
Plugin Contributions:
0

Re: Overriding so that the left hand column dosn't appear on main/home page

countrycharm:

Did you read what Clydejones suggested>
http://www.zen-cart.com/forum/showpost.php?p=475042&postcount=7

Hi

Yeah I tried the above, but the right column still appears on the contact us, shopping cart, search and account page etc!? Any ideas how to stop it from appearing on these pages and just have it on the index page?

Thanks

Claire

29 Feb 2008, 2:47 PM
#15
clydejones avatar

clydejones

Deceased

Join Date:
Nov 2005
Location:
Colorado Springs, CO USA
Posts:
7,017
Plugin Contributions:
12

Re: Overriding so that the left hand column dosn't appear on main/home page

claschy:

Hi

Yeah I tried the above, but the right column still appears on the contact us, shopping cart, search and account page etc!? Any ideas how to stop it from appearing on these pages and just have it on the index page?

Thanks

Claire

Try www.zen-cart.com/tutorials/index.php?article=233

NOTE: We are sorry that Clyde is no longer with us.
We are grateful for all his contributions to the Zen Cart community.

12 Apr 2008, 2:31 PM
#16
cochlear avatar

cochlear

Zen Follower

Join Date:
Apr 2007
Location:
Sydney
Posts:
110
Plugin Contributions:
0

Re: Overriding so that the left hand column dosn't appear on main/home page

yellow1912:

Why dont you disable it by default, and only display on main?
How do you do that?

12 Apr 2008, 2:46 PM
#17
cochlear avatar

cochlear

Zen Follower

Join Date:
Apr 2007
Location:
Sydney
Posts:
110
Plugin Contributions:
0

Re: Overriding so that the left hand column dosn't appear on main/home page

cochlear:

How do you do that?
OK I've found it at the end of the FAQ.

I actually need to have the left column off except for the index page and product listing pages. Is there any easy way to do it?

12 Apr 2008, 4:31 PM
#18
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Overriding so that the left hand column dosn't appear on main/home page

$flag_disable_left = true;
if ($this_is_home_page or ($current_page_base == 'index' and $cPath > '0' )) {
$flag_disable_left = false;
}
12 Apr 2008, 11:23 PM
#19
cochlear avatar

cochlear

Zen Follower

Join Date:
Apr 2007
Location:
Sydney
Posts:
110
Plugin Contributions:
0

Re: Overriding so that the left hand column dosn't appear on main/home page

Glenn thanks for your help. I've tried the code and it does work now! :)

12 Jan 2009, 2:55 PM
#20
wulf359 avatar

wulf359

New Zenner

Join Date:
Feb 2008
Posts:
44
Plugin Contributions:
0

Re: Overriding so that the left hand column dosn't appear on main/home page

This thread seems to be the most appropriate place for my question so......

I have a site that on the main page, in the left column, I do not want to display any sideboxes but instead have an image showing.

On every other page for the site, the sideboxes are fine, I just need to get the image to only display in the left column and only on the main page.