On this page
Patterns 7.x Installation
Patterns is installed as a normal Drupal module. Its dependencies are the Token and Libraries modules. In order to enable automatic extraction of Patterns files from the database, the Macro module must be installed as well.
Moreover, Patterns makes uses of two external libraries that should be installed separately: Spyc and Codemirror.
-
Spyc is a native PHP library used to parse YAML files. It is necessary for running YAML-based patterns, and it should be installed under sites/all/libraries/spyc
-
Codemirror is a Javascript library which considerably enhances the interface of the Patterns editor page. It is not necessary for the correct functioning of Patterns, but recommended.
Patterns 7.x-2.x supports Codemirror 3. In case you want to use it the library should be installed under sites/all/libraries/codemirror-3.0.
Patterns 7.x-1.x supports Codemirror 2. In case you want to use it the library should be installed under sites/all/libraries/codemirror2.
Patterns Submodules
After installing Patterns, you probably need to enable some of its submodules as well. Here follows a brief explanation.
- The
Patterns Componentssubmodule allows the Patterns engine to handle different Patterns tags (e.g. node, vocabulary, term, etc.). By default no tag is allowed. - The
Patterns Parserssubmodules enables parsing (read / write) of different formats (XML, YAML and PHP available) - The
Patterns Examplesadds several examples files about how to write patterns.
Drush Makefile
-
Download and extract Drush.
-
Change into your (possibly empty) target directory in your webroot.
-
Run the makefile: PATH_TO_drush/drush make PATH_TO_patterns.make
-
Your directory structure should be ready to use.
Installation Profile
The Patterns Installation Profile can be found at http://drupal.org/project/patterns_profile, but in the current version only Patterns 7.x-1.x is supported.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion