Main functionality

Adds a new condition to the context module that allows performing regular expression tests on the useragent string ($_SERVER['HTTP_USER_AGENT']). This allows adding different reactions based on the user's browser, operating system, or other needed contexts that may be found in the useragent string.

Submodule

The module also comes with a second submodule (Context Useragent Defaults) which provides a number of default contexts for popular browsers and operating systems. These contexts, by default, simply apply a body class to the page to identify the current user's browser (useful for targeting specific browsers in a theme's css [ex: body.ie7 #stinks{padding:5px;}]).

The contexts currently included in the Context Useragent Defaults submodule are as follows:

  • Browsers: Chrome 6 & 7, Firefox 2-4, Internet Explo[d]er 6-8, Opera 9 & 10, and Safari 3-5
  • OSs: Linux, Mac, and Windows

Requirements

Context 3.0 or higher

Project Information

Downloads