Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It took me quite a bit of digging around to work out the correct way of defining contexts in code (which is easy once you know how).
Quick write-up here: http://www.mcdruid.co.uk/content/default-drupal-contexts-like-default-views
Could I suggest a few additional lines in API.txt to point developers in the direction of implementing hook_ctools_plugin_api() and hook_context_default_contexts()?
Patch should apply to 6.x-3.0 and 6.x-3.x - haven't looked at whether this would be applicable to D7 releases.
Comment | File | Size | Author |
---|---|---|---|
API.txt_plus_default_contexts.patch | 1.01 KB | mcdruid | |
Comments
Comment #1
vensires CreditAttribution: vensires commentedI upgrade this to Drupal7 since this also took me some time to find. I suspected it had something to do with ctools but I would prefer it to be more clear.