RE Context Libraries module available on drupal.org

The RE Context Libraries module is the latest 'official' module released by Raised Eyebrow. This is a small module that builds upon the excellent Context module and has promises to be a real timesaver when theming new Drupal websites.

The Context module's great advantage over Drupal's native Blocks module is that it dramatically expands the set of conditions that can be used to determine where blocks can be displayed. This enables us to build Drupal sites where the behaviour of blocks is quite sophisticated--for example, we might decide to display a block containing a list of upcoming events on event nodes or on nodes with a certain taxonomy term. On a stock Drupal site, this would require custom coding.

Similarly, on a stock Drupal site, it requires custom coding to add special javascript or css files to specific nodes, node types, views etc. Out of the box, the Context module doesn't help with this specific problem, but it does make it possible for other modules to add "reactions" to contexts. The RE Context Libraries module builds on this capability of Context, to provide a new kind of reaction, "Include Libraries," that can be employed in any context. This enables us to add special javascript or css files only where they are needed with little to no custom coding.

The RE Context Library module works by allowing other modules to register css or javascript libraries as "reactions" that can be associated with specific contexts. The module includes a sample module called "RE CL Example" that developers and themers can study to learn how to provide their own Context Libraries (don't worry: the entire re_clexample module is only 140 lines long, including CSS, javascript and code comments).