Exclude sideboxes from home page only?
I can't seem to find out what the proper code is to insert here.
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;}
I'm wanting to hide all sideboxes on the right side but only on the home page/main page. I'm using a modified AppleZen template that restricts sideboxes to only display on the right side. When I tried to insert the following...
if ($this_is_home_page) {
$flag_disable_left = true;
I get a parce error. Any help would be greatly appreciated.
Vood
Re: Exclude sideboxes from home page only?
Re: Exclude sideboxes from home page only?
Thanks for the thread ref. but it still isn't working for me. When I replace the code, I'm still seeing the Categories, Reviews and Information boxes on the right side. Sorry to be a pain.
Vood
Re: Exclude sideboxes from home page only?
Quote:
Originally Posted by
Vood
I'm wanting to hide all sideboxes on the right side
....
if ($this_is_home_page) {
$flag_disable_left = true;
...
Did you choose "right" in both places?
Re: Exclude sideboxes from home page only?
Quote:
Originally Posted by
DrByte
Did you choose "right" in both places?
I'm not sure what you mean by "in both places". I cut the code from the thread you referred me to and pasted it in place of the existing if statement on the tpl_main_page.php. Should I have kept that one and just added the extra code as follows?
if ($current_page_base == 'index_home' and $cPath == '') {
$flag_disable_left = true;
}
When I tried to add code like that before (not the same code but one that worked for me earlier) I got a parce error.
Vood
Re: Exclude sideboxes from home page only?
Here is the code as I have it now. There is no effect on the display of the home page.
// 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;
}
if ($current_page_base == 'index_home' and $cPath == '') {
$flag_disable_left = true;
}
Thanks for any help.
Vood
Re: Exclude sideboxes from home page only?
Quote:
Originally Posted by
Vood
if ($this_is_home_page) {
$flag_disable_left = true;
This is the right approach to solving the problem that you have stated, but you will get errors, because there's a "}" missing from the end, and it will disable your left column, not your right column.
Quote:
Originally Posted by
Vood
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;
}
This won't do anything as there are no pages listed in the array for it to work on.
Quote:
Originally Posted by
Vood
if ($current_page_base == 'index_home' and $cPath == '') {
$flag_disable_left = true;
}
This is syntactically correct, but still addresses the left column rather than the right and your first example would be an easier and clearer approach.
Re: Exclude sideboxes from home page only?
Sorry. I'm not communicating very well. Here is the actual code on the tpl_main_page.php page.
// 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;
}
if ($current_page_base == 'index_home' and $cPath == '') {
$flag_disable_right = true;
}
$header_template = 'tpl_header.php';
$footer_template = 'tpl_footer.php';
$left_column_file = 'column_left.php';
$right_column_file = 'column_right.php';
$body_id = ($this_is_home_page) ? 'indexHome' : str_replace('_', '', $_GET['main_page']);
It still doesn't do anything.
Vood
Re: Exclude sideboxes from home page only?
I have also tried to replace the first if statement with the second one to no avail.
Vood
Re: Exclude sideboxes from home page only?
Apple Zen was coded to have right sideboxes only. Maybe also coded
so that sideboxes cannot be removed..suggest also posting your query in Apple Zen Support thread at
http://www.zen-cart.com/forum/showth...ight=apple+zen