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?
Views: 860
New Zenner
Is there a way to remove the sideboxes on individual pages through the admin panel?
Totally Zenned
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 .)
New Zenner
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:
Totally Zenned
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.**
Totally Zenned
... 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.
New Zenner
Thanks so much schoolboy! I will try this over the weekend. Hopefully I won't have any other questions,
Tell staff why this post should be reviewed.