Is there a way to remove the sideboxes on individual pages through the admin panel?
Is there a way to remove the sideboxes on individual pages through the admin panel?
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 .)
20 years a Zencart User
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.![]()
In tpl_main_page.php, around line #41, find the line:-
Then, as the instruction says, list the pages you don't want to have a right column.PHP Code:// 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;
}
EG:-
In my example, I have disabled right column for the CREATE ACCOUNT page and the CONTACT US page.PHP Code:// 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;
}
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.
20 years a Zencart User
... and if you want to disable the LEFT column for certain pages, you duplicate the line:-
and changePHP Code:// 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;
}
$flag_disable_right = true;
to
$flag_disable_left = true;
Then, insert the page_names, as before.
20 years a Zencart User
Thanks so much schoolboy! I will try this over the weekend. Hopefully I won't have any other questions,