Have a look at
http://drupal.org/project/crumbs
#1045524: Deep theme switching with Crumbs + Themekey
#1060646: Integration with Crumbs for sections inheritance
Crumbs is a module that gives every page a trail of paths (and a breadcrumb).
In combination with context, this would allow a kind of inheritance of the context to sub-pages.
Context is a bit different, because one page can have more than one context (afaik), and the conditions are more flexible.
I wonder what would be the best idea to integrate that.
- Iterate the trail paths in reverse order, until you can either match or discard a given context.
- Or: have a separate plugin for crumbs. This could be based on path patterns or something else.
Comments
Comment #1
donquixote commentedDifficulty:
Plugins that support this need to be able to match a path, without looking at page-specific global state.
For instance, if the plugin looks at menu_get_item() or menu_get_object() or $_GET['q'], then we cannot ask this plugin about the parent page.
This is not about global state in general - the global $user information is usually totally fine. But, any global state that differs from one path to another is problematic.
Solution:
Plugins can declare that they are independent of page-related global state, and only these plugins will be considered for evaluation of the parent path.
Comment #2
gaëlgYou may have a look at this: #1783510: Context condition on breadcrumb path.