I have created a submodule trying to solve the blocks ordering problem when multiple contexts placed blocks i the same region. Our company has been running a version of this module in production for the d6-version of context for over a year without issues. I have now cleaned it up a bit and ported to d7.
Thes d6-version works without significant changes in the context-module itself, but since d7-version is using hook_page_build for building the blocks, not the theme registry, I could think of no good way of overriding this except making some small changes. Because of this it was also possible to minimize and simplify the code base compared to the d6-version.
I have not tested the patch all that exhaustively yet, but so far I can tell it's working good. The block placement concept of the module is probably not obvious, so could need some UI-improvements to make things clearer. The plugin looks just like the blocks-reaction, but does not place any blocks. Instead it uses it's block's weights as a template when more than one block-reaction tries to occupy the same region with blocks. Also, not really happy with the name as it is not very descriptive. Perhaps "Context block weight manager", or "Context block layout" is better? I'm not sure.
If you want a more elaborate explanation concerning motivations behind the changes, or how the module works in general, just ask away.
Comment | File | Size | Author |
---|---|---|---|
#1 | context-block-weights-1668580-1.patch | 18.91 KB | gnucifer |
Comments
Comment #1
gnucifer CreditAttribution: gnucifer commentedComment #2
shunting CreditAttribution: shunting commentedWould it be possible to release the d6 version?
Comment #3
duellj CreditAttribution: duellj commentedThe patch is for 7.x and hasn't been reviewed/committed. Once that happens a backport can be discussed
Comment #4
prabhatjn CreditAttribution: prabhatjn commentedI have got the following error:
This is an important work, can you please comment...
Thanks,
P.
Comment #5
gnucifer CreditAttribution: gnucifer commentedThe patch is quite old. You will probably need to review the failed chunks and merge them manually. Right now I don't have time to do this myself, but if a project comes along where I need this again I will of course create and share a new patch. You could also try to apply the patch to an older release.
Comment #5.0
gnucifer CreditAttribution: gnucifer commentedspelling etc