Closed (fixed)
Project:
Context
Version:
7.x-3.0-beta1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
6 Dec 2012 at 05:19 UTC
Updated:
8 Oct 2014 at 08:24 UTC
Jump to comment: Most recent
Comments
Comment #1
tekante commentedYes, if you want the context placed blocks you'll need to use the block_get_blocks_by_region method of the context_reaction_block block class. You'll want something similar to
if ($plugin = context_get_plugin('reaction', 'block')) {
$plugin->block_get_blocks_by_region('region');
}
Though more generally, $plugin->execute($page_render_array) is called and the regions in the render array are populated by the block reaction. The block_get_blocks_by_region isn't declared as a private method but I would recommend exercising a little caution when using it should it change in the future. I don't think a change is very likely but wanted to mention it is a possibility.
Comment #2
tragic.rich commentedThank you for the quick update! I will try out the code you provided.
Comment #4
kumkum29 commentedHello,
I have the same problem on my site. The above code is it always functionnal ?
Here is my code to implement a custom region in a node.tpl:
How can I modify this code for using context?
Thanks for your help.
Comment #5
kumkum29 commentedHello,
It's ok with the context_reaction_block class mentionned in #1 and with this post:
http://kahthong.com/2012/08/embed-drupal-block-region-node-page