Git Product home page Git Product logo

re_contextlibraries's Introduction

RE Context Libraries README.txt

Introduction

In Drupal, modules are often used to provide access to javascript libraries, but it's often undesirable to include those libraries on every page. The theming system makes it possible to specify where and when a javascript library file is included, but this system is not always sufficiently flexible.

The Context module provides a way of defining 'reactions' (such as blocks) to specific contexts (such as path, page or view), but there's no default way to use Context to include a javascript library.

The RE Context Libraries module provides a way to make javascript (or CSS) libraries available as reactions in contexts. To make individual javascript library files available, it is only necessary to write a very short 'library' module. These modules register their js and/or css files with the system so that they can be used as 'reactions' within the context administration form.

Installation

  1. To install the module, move it into one of Drupal's standard module directories such as sites/all/modules and enable it from the Modules administration page at admin/build/modules.
  2. Enable at least one library module from the Modules administration page.

Examples

The RE CL Example module in the re_clexample folder demonstrates how to provide a simple javascript library for use in any Context reaction. To use the module, first enable it on the modules page, then add it as a reaction on the edit page for a context.

re_contextlibraries's People

Contributors

ctorgalson avatar

Watchers

James Cloos avatar  avatar

re_contextlibraries's Issues

Remove project-specific code

The module contains code specific to the project against which it was originally developed. These should be removed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.