views:

40

answers:

2

How do I assign a block (the very same block) twice or thrice to different regions? The idea is not to have the same block on the same page more than once, but in different locations on different pages, so four 'displays' would be available:

  • Block X in the $top_left region
  • Block X in the $top_right region
  • Block X in the $above_content region
  • Block X hidden

Where it should be located, should be as simple as adding node paths in the textare, right? I understand that's what it's for...

If it's a module (please god no, not another module!), I'd like a few details.

Thanks.

+3  A: 

http://drupal.org/project/multiblock module do the job.

gagarine
+5  A: 

You'll want to look into the Context module, which will let you assign blocks based on sets of conditions. You create a context, set up a couple of conditions, then create a reaction to those conditions where your block appears.

So, let's say you wanted to show Block X on the front page and when a user is logged in. When it's the front page Block X is in Region 1, but when the user is logged in, Block X is in Region 2.

You'd create two contexts:

  1. Conditions: Is Front Page, User is anonymous, Reactions: Show Block X in Region 1
  2. Conditions: User is logged in, Reactions Show Block X in Region 2

I'm generalizing here, but you'll see what conditions and reactions are available for use when you install Context.

Mark Trapp
I've heard about Context, but couldn't find where to setup those blocks. I understand the conditions. Very clear. Sounds like it should have been a Drupal core module.Where can I find the Context's interface? :) Thanks
Rudie
If you downloaded it, besides *Context*, you need to enable *Context UI*. Then, you can access the the UI at *Site Building* -> *Context*.
Mark Trapp
By the way: I tried Context but there's a conflict or something if you use Zen as a basetheme (and there's a fix which I used and now I love Context!)
Rudie