Screenshot of the user display of a custom header element.
Screenshot of the source code showing the placeholder text while in test mode.
Screenshot of the source code showing the rendered header element.

Contextual Elements provides an interface to allow administrators to add HTML elements to the headers and footers of their site given certain criteria.

The use case that spawned this module is the need to implement a Google Analytics like module that was capable of handling multiple GA codes. The filtering system was modeled from the GA module.

Installation

  1. Download the Contextual Elements module and place it in your site's "modules" directory. (usually "sites/all/modules/contrib")
  2. In your site, enable the module.
  3. Enable permissions for the allowed roles. BE EXTREMELY CAUTIOUS! This module permits users with the proper permissions to embed ANY code into the header and the footer of the site!
  4. Go to Configuration > Search and metadata > Contextual Elements to begin creating elements.

If you would like to help, patches are always welcomed.

Project Information

Downloads