1

How to find which content type (abc) is using which context? As I do have around 30 contexts in my site.

Is there a way to find which context is using content type (abc)?

1

Here are some module suggestions that may help get you closer to find the exact answer to your question:

  • Context Inspector block provided by the Devel module

    If you use the Devel module you'll have a "Context Inspector" block. You can place that block in a region on a page and then see the current contexts output via Krumho.

  • Devel Catcher module

    To enhance your "debugging" experience (hm, hm ...), there is also the Devel Catcher module, which has Devel as a module dependency.

    Here is an excerpt from its project page (why you may want to consider this module):

    ... aggregates or "catches" all development debug info into one easy to access place.

    Similar in style to Firebug or Chrome's Inspector. Devel Catcher intercepts common debug info into a tabbed interface as opposed to having to assign debug blocks to a region or dumping the output at the end of your HTML document.

    Currently Devel Catcher can catch the query log from the Devel module, node access rules from the Devel Node Access module and the context inspector block from the Context UI module.

So by using (repeating) this approach for a page of each of your content types, you might be able to find out which content type is using which context, no?

  • great to see the Devel Catcher module, I am not at all aware of that. This module make sense to me. – NTT Apr 13 '16 at 11:05
  • After you ever had some time to experiment with it, I'd be interested in some type of feedback (via an extra comment) about it ... – Pierre.Vriens Apr 13 '16 at 11:59
0

May be it helps someone.

$active_contexts = array_keys(context_active_contexts());
foreach($active_contexts as $active_context) {
  print $active_context;
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.