Forums / Addon Sideboxes / Blank Sidebox question

Blank Sidebox question

Locked
Results 1 to 8 of 8
This thread is locked. New replies are disabled.
03 Sep 2010, 01:38
#1
coffinwear avatar

coffinwear

Zen Follower

Join Date:
Dec 2009
Posts:
124
Plugin Contributions:
0

Blank Sidebox question

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.
03 Sep 2010, 01:58
#2
samar777 avatar

samar777

Zen Follower

Join Date:
Nov 2009
Posts:
202
Plugin Contributions:
0

Re: Blank Sidebox question

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"
03 Sep 2010, 02:02
#3
coffinwear avatar

coffinwear

Zen Follower

Join Date:
Dec 2009
Posts:
124
Plugin Contributions:
0

Re: Blank Sidebox question

Been there, done that. I haven't found anything that has helped.
03 Sep 2010, 03:00
#5
samar777 avatar

samar777

Zen Follower

Join Date:
Nov 2009
Posts:
202
Plugin Contributions:
0

Re: Blank Sidebox question

gjh42:

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.




 if ($this_is_home_page) {
    $show_featured = true;
  } else {
    $show_featured = false;
  }

Glenn,

How do I replicate/modify that to add more pages to exclude it from? say if we want to disable featured sidebox from shopping_cart, and Login pages.
03 Sep 2010, 06:14
#6
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Posts:
21,876
Plugin Contributions:
6

Re: Blank Sidebox question

Look at the comments in tpl_main_page.php - they cover several forms of conditional tests.

You might try[php]$show_featured = true;
if (in_array($current_page_base,explode(",",'shopping_cart,login')) ) {
$show_featured = false;
}[/php]using the "main_page=whatever" that you see in the address bar on each page you want to exclude.
04 Sep 2010, 14:18
#7
samar777 avatar

samar777

Zen Follower

Join Date:
Nov 2009
Posts:
202
Plugin Contributions:
0

Re: Blank Sidebox question

$show_categories = true;
if (in_array($current_page_base,explode(",",'specials')) ) {
  $show_categories = false;
}  


Hey Glenn,

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?
06 Sep 2010, 13:56
#8
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Posts:
21,876
Plugin Contributions:
6

Re: Blank Sidebox question

That test goes in the sidebox module file (in this case /includes/modules/sideboxes/categories.php).