I'm sure there's a thread about this already but I can't seem to find it. I'm using the blank sidebox mod and I'm needing a way to turn it off on certain pages.
Thanks for any help.
I'm sure there's a thread about this already but I can't seem to find it. I'm using the blank sidebox mod and I'm needing a way to turn it off on certain pages.
Thanks for any help.
search the forum for " turn off sideboxes on certain pages", or a variant of that, instead. It surely is a well discussed topic.
Rules apply to all side-boxes and not just 'blank sidebox"
Been there, done that. I haven't found anything that has helped.
In the tutorials: I want to display some of my sideboxes on my front page only, and suppress them from all other pages.
If you tell us which pages you don't want it on, we can suggest details of test code.
Look at the comments in tpl_main_page.php - they cover several forms of conditional tests.
You might tryusing the "main_page=whatever" that you see in the address bar on each page you want to exclude.PHP Code:
$show_featured = true;
if (in_array($current_page_base,explode(",",'shopping_cart,login')) ) {
$show_featured = false;
}
Hey Glenn,Code:$show_categories = true; if (in_array($current_page_base,explode(",",'specials')) ) { $show_categories = false; }
In this example, I tried to get a handle on this, and tried to hide "Categories" side box from 'specials' page. ( I placed the code in tpl_mail_page.php right above $header_template = 'tpl_header.php';
Doesnt seem to work. What am i doing wrong?
That test goes in the sidebox module file (in this case /includes/modules/sideboxes/categories.php).
Bookmarks