It would be nice if one could disable regions as a context reaction

CommentFileSizeAuthor
#2 1079108.patch4.79 KBe2thex
#1 1079108.patch4.77 KBe2thex
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

e2thex’s picture

FileSize
4.77 KB

I have attach a patch to add the reaction. Having a little problem with the test (it currently fails :(), will revisit the test later

e2thex’s picture

FileSize
4.79 KB

So part of the problem was that that patch did not work but the test is still failing

tekante’s picture

It is unclear to me why the test is failing. When I add some debugging statements and look at the output I can see that the testcontext is enabled and that the content region is being unset via the execution of the plugin but the content still appears on the page as simpletest sees is.

You can add the following to see that the context is active

$context->reactions = array('debug' => array('debug' => 1), 'region' => array('bartik' => array('disable'=> array('content' => 'Content'))));

And putting the following on line 40 of context_reaction_region.inc

drupal_set_message('Unsetting ' . $region);

Shows that the plugin is running and unsetting the content region when inspecting the page fetched by the test even though the content region content is present right below the message.

febbraro’s picture

Status: Active » Closed (fixed)
mrtalloy’s picture

How do I install this to use it?
Very good idea by the way!

tekante’s picture

@mrtallow - the latest 7.x-3.x-dev release contains this code for use or you can use git to keep up with the absolute latest between dev snapshots

mrtalloy’s picture

Status: Closed (fixed) » Active

Bril! It's working great - I've tried it with views and with pages and it works really well on both
This is a really good module. Have you got more plans with its functionality?
I wish I knew how to write these things so I could contribute. Anyway thanks a lot, this is awesome!

mrtalloy’s picture

Status: Active » Fixed

fixed*

febbraro’s picture

Status: Fixed » Closed (fixed)
ntigh52’s picture

Hi to all,
I instal the Context Module I changed and added the files with the bug, but I dont know how to instal the patch.
I dont know how to solve that issues:
1. I deleted regions but the header and footer still Appear.
2. I can change blok position on the reaction.
3. What is the easy way to define a different theme to spicific content type?
Can anyone help me to solve my problem?
please....

sorensong’s picture

Soooo has this been added? I'm not able to 'disable regions'.

tekante’s picture

@sorensong - yes this has been added, in the reaction you should see a region option and when choosing it should be able to select the region(s) you want to disable for each of your active themes when the context is active.