Re: How to turn off colum or sideboxex on a single product listing page
Hello,
I am trying to disable the left and right columns for my login page. I read the tutorial Misty suggested and this is what I have put in the tpl_main_page.php file:
PHP Code:
// the following IF statement can be duplicated/modified as needed to set additional flags
if (in_array($current_page_base,explode(",",'login')) ) {
$flag_disable_right = true;
$flag_disable_left = true;
}
I also uncommented as 2 lines as follows:
PHP Code:
* Note: footer can be disabled in the tpl_footer.php<br />
* <br />
*/ $flag_disable_header = true;<br />
$flag_disable_left = true;<br />
$flag_disable_right = true;<br />
/** $flag_disable_footer = true;<br />
* <br />
It doesn't seem to be working. I have betterCategoriesEzInfo_v1.3.5 installed if that makes a difference?
Can anyone suggest how I should be doing this? I may want to include a couple of other pages later. Would I just be able to add them into the code with only a comma separating them, as explained in the tutorial?
Thank you
Re: How to turn off colum or sideboxex on a single product listing page
PHP Code:
* Note: footer can be disabled in the tpl_footer.php<br />
* <br />
*/ $flag_disable_header = true;<br />
$flag_disable_left = true;<br />
$flag_disable_right = true;<br />
This actually would uncomment three lines (header, left and right). But the HTML <br /> tags left in place would not be read correctly by PHP, and would likely cause problems for at least the second and third lines.
You don't mention if you restarted the comment after these lines.
If they did work correctly, they would work on all pages, not just the login page.
The if (in_array... part looks correct, though, and should work.
Re: How to turn off colum or sideboxex on a single product listing page
since the */ (end of the commented section) is on the same line as the header flag, wouldn't the header still be commented out?
Yes, I did start the comment after those lines.
Would I just remove the <br /> from all those lines?
No, it didn't work the way I had it. I have put things back to original state for now. The left and right columns were still active on all pages.
This isn't a need but rather a want.
:yes:
Re: How to turn off colum or sideboxex on a single product listing page
The /* */ comments are very specific. They enclose the comment precisely. Anything inside is commented, anything outside is not.
The // style of php comment does comment out everything AFTER it on the same line.
But you don't want to use those particular flags in the basic tpl_main_page.php file anyway, because they would eliminate the sidebars everywhere in your site.
Re: How to turn off colum or sideboxex on a single product listing page
I understand now, thank you.
Okay I left the comments in on those flags then I put the login page in the IF statement. It works except that the page doesn't load the stylesheet all the way. The color background loads but the white over the background does not load. If I can figure out how to get the page to load properly just without the left and right column it would be perfect.
Thank you for explaining the stuff earlier.