Turn off right column in home page only
I gather that to turn off the right column in only the Home Page I insert the following code into the file tpl_main_page.php (in an override structure):-
if ($this_is_home_page) {
$flag_disable_right = true;
}
However I am unclear exactly where in the file this should be inserted.
Can someone please verify that I am correct, and clarify my confusion.
Re: Turn off right column in home page only
Rather try this:
Find the line (Around 42 / 43)
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;
}
... and insert index where shown...
PHP Code:
// the following IF statement can be duplicated/modified as needed to set additional flags
if (in_array($current_page_base,explode(",",'index')) ) {
$flag_disable_right = true;
}
Later, if you want to, you can disable right column for more pages in this way.
Re: Turn off right column in home page only
:oops: Suggestion above does not work for home page only... Sorry...
Will get back to you.
Re: Turn off right column in home page only
Just paste it under this, as shown below:-
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;
}
if ($this_is_home_page) {
$flag_disable_right = true;
}
Re: Turn off right column in home page only
Quote:
Originally Posted by
KiwiBrian
I gather that to turn off the right column in only the Home Page I insert the following code into the file tpl_main_page.php (in an override structure):-
if ($this_is_home_page) {
$flag_disable_right = true;
}
However I am unclear exactly where in the file this should be inserted.
Can someone please verify that I am correct, and clarify my confusion.
Your code is correct and the file would go here:
includes/templates/YOUR_TEMPLATE/common/tpl_main_page.php
If you do not already have a 'common' dir. then you can create one.
Re: Turn off right column in home page only
Thanks to you both for the help.
Rob, I appreciate your confirmation that the code insert is correct, but you did not answer my main query regarding exactly where in the file the snippet should be inserted.
Re: Turn off right column in home page only
Quote:
Originally Posted by
KiwiBrian
Thanks to you both for the help.
Rob, I appreciate your confirmation that the code insert is correct, but you did not answer my main query regarding exactly where in the file the snippet should be inserted.
Same place as fairestcape was suggesting
Re: Turn off right column in home page only
Thanks DB for the clarification.