Posted by boombatower on November 18, 2011 at 1:22am
Exposes session ($_SESSION) variables to Context.
Variables are made available in the "session" namespace with the attribute being the key. If the session value is an array the attribute names will be generated as follows: key.subkey, key.subkey2, key.subkey2.subsubkey.
For example you can access the session variables in context as follows.
<?php
context_get('session', 'key');
context_get('session', 'key.subkey');
?>Possible usecases
- This module can be useful for flagging a context to enable or disable based on some event by simply setting or unsetting a session variable.
- Another usecase is to provide values for Views default argument from Context from the user session. This allows a view or set of views to be effected by a session value which can allow a user to toggle some global context to effect many views on a site.
Downloads
Project Information
- Maintenance status: Minimally maintained
- Development status: Maintenance fixes only
- Module categories: Developer
- Reported installs: 11 sites currently report using this module. View usage statistics.
- Downloads: 77
- Last modified: November 21, 2011