I have three different namespace/attribute pairs, each with multiple context values. Thus, several contexts can be active at the same time.
If I populate the same regions in multiple active contexts, it appears that there is no way to control the block weights as they appear in the final rendered region. I cannot find any method in the UI to do this.
My attached screen shot shows the setup of my contexts. If, for example, I populate the same region with blocks based upon "treet_ui > focus > community" as well as "treet_ui > site > entertainment" the blocks defined in the entertainment context always appear above those in the community context, whereas I want them to be the other way around and can see no way to do that.
Of course I could define mutually-exclusive regions in my theme, but that would create many regions for the same kind of content with the sole purpose of allowing weighting of blocks when such conflicts arise.
Am I missing something obvious? Or, have I used the system not as it was intended?
| Comment | File | Size | Author |
|---|---|---|---|
| context_definitions.png | 61.03 KB | garywiz |
Comments
Comment #1
mrfelton commentedsame issue for me. Perhaps we need a weighting on contexts themselves?
Comment #2
garywiz commentedI would love to hear some developer comments on this to find out what the general advice would be for solving these problems. Since I opened the issue, we have "coped" with this, but mainly by limiting the way we use contexts to avoid the issue. But, it severely limits the versatility of contexts for us, which is a shame, because it is a very powerful module.
Comment #3
mrfelton commentedWell, it strikes me that the most simple solution would be drag/drop ordering (weighting) of the contexts on the context overview page. That would give some level of control, but it's still not ideal. Really, there would need to be some kind of way of editing 'merged contexts', giving you control over the position of all the blocks that are visible from any context, though I can't really see how that would be possible without making an incredibly complex UI.
Comment #4
garywiz commentedI think that it could be a variation on what happens now. At the moment, in each context you get "greyed out" blocks which are included in the theme directly. If the total list of blocks includes, in addition, all context-specific blocks and they are greyed-out as well, then you could reorganize blocks easily whenever you add or edit a context.
I have no clue how all this would work from an internals point of view, but from a UI point of view it would be intuitive and I believe, foolproof. It doesn't really matter that blocks would appear in the weighting list that may or may not be rendered. The weighting would still work fine.
Maybe with some configurations with lots of blocks, it would be clutter. So, an ajax checkbox that says "Display Blocks from Other Contexts" might be a good way to give people the option.
Comment #5
marcushenningsen commentedI would like to vote in favor of this feature.
I believe this issue is targeting the same problem:#455908: Allow setting block weight via context admin UI. The maintainer seems to be interested, but I suppose they have a lot of work at developmentseed =)
Marcus
Comment #6
yhahn commentedhttp://drupal.org/node/455908#comment-2572078