In some cases will be useful to be able to add different paths to a context.

For example if somebody wants to add contact page from contact.module or forum list from forum.module to specific contexts. For some people it will be more easy than to use function set_context().

Comments

yhahn’s picture

Assigned:Unassigned» yhahn
Status:Active» Fixed

I've added an experimental path-based context setter in this commit: http://drupal.org/cvs?commit=169258

It allows you to define paths (separated by line breaks) for each context where the context should be set. One caveat to take note of is that the setter

  1. Does not use regular expressions for performance reasons. Regex'ing the path would require a check between the page's path and potentially every defined path setter for every enabled context on the site -- not a happy prospect.
  2. Matches any initial part of the current page's path. So if you enter contact as your path, pages at contact/info, contact/info/me, etc. will all set the context.

Let's see if this addresses users' needs adequately.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.