I have created a Context using the Context module for use with a custom module.

Is it possible to export a context and then import it with my custom module? And if so, where does the data from the export need to go in my module?

1 Answer 1


Way1: Using Features module

I would recommend you to use features module to export your configurations like context, it will automatically pull the context configurations in code.

Way2: Using custom module

If for some reasons you want to do it in custom code then

  • Thanks for the response, but after doing some more research, I realized I could do what I wanted to using hook_node_view.
    – Schaffer
    Oct 3, 2016 at 16:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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