Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Removing sidebox from main in Admin?

Removing sidebox from main in Admin?

Locked

Views: 860

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
25 Mar 2008, 6:48 PM
#1
reeflippee avatar

reeflippee

New Zenner

Join Date:
Mar 2008
Posts:
64
Plugin Contributions:
0

Removing sidebox from main in Admin?

Is there a way to remove the sideboxes on individual pages through the admin panel?

25 Mar 2008, 8:04 PM
#2
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Removing sidebox from main in Admin?

You can disable left and right columns by page - not through the admin panel - but by editing:-

includes\templates\template_default\common\tpl_main_page.php .

FTP a COPY of this file to your hard drive, and make the edits on this copy.

When you're complete, FTP the edited file to:-

includes\templates\YOUR-TEMPLATE\common\tpl_main_page.php

(Instructions on how to disable columns by page are embedded in the tpl_main_page.php file .)

25 Mar 2008, 8:26 PM
#3
reeflippee avatar

reeflippee

New Zenner

Join Date:
Mar 2008
Posts:
64
Plugin Contributions:
0

Re: Removing sidebox from main in Admin?

I don't get it. I've tried to edit different things in the file, but I'm at a loss. Can you tell me what I need to do exactly? I just can't focus anymore and I'm about to give up. :cry:

26 Mar 2008, 9:48 AM
#4
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Removing sidebox from main in Admin?

In tpl_main_page.php, around line #41, find the line:-

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

**Then, as the instruction says, list the pages you don't want to have a right column.

EG:-**

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

In my example, I have disabled right column for the CREATE ACCOUNT page and the CONTACT US page.

TIP: To find out the page names of pages you want to include in your list, click on the link that calls up that page. In your address bar you will see how zencart names that page. EG:-

http://www.your-website.com/index.php?main_page=contact_us
**
So you would add " contact_us " to your list.**

26 Mar 2008, 10:01 AM
#5
schoolboy avatar

schoolboy

Totally Zenned

Join Date:
Jun 2005
Location:
Cumbria, UK
Posts:
10,327
Plugin Contributions:
0

Re: Removing sidebox from main in Admin?

... and if you want to disable the LEFT column for certain pages, you duplicate the line:-

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

and change
$flag_disable_right = true;
to
$flag_disable_left = true;

Then, insert the page_names, as before.

26 Mar 2008, 1:30 PM
#6
reeflippee avatar

reeflippee

New Zenner

Join Date:
Mar 2008
Posts:
64
Plugin Contributions:
0

Re: Removing sidebox from main in Admin?

Thanks so much schoolboy! I will try this over the weekend. Hopefully I won't have any other questions,