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.

CommentFileSizeAuthor
API.txt_plus_default_contexts.patch1.01 KBmcdruid
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vensires’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev
Issue summary: View changes

I 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.