How patterns files are stored and loaded
Last updated on
30 April 2025
The Patterns module in Drupal hierarchically looks for pattern files in the following locations:
- The Drupal public files folder (usually
/sites/default/files/patterns/); - A user defined folder (default:
/sites/all/patterns/); - The Patterns module patterns directory (usually
/sites/all/modules/patterns/patterns/); - Any installation profile directory (e.g.
/profiles/standard/patterns).
These patterns are filed such that they are uniquely identified by their file name. In cases where two or more patterns have the same file name in different locations, only the first one patter is loaded.
When a file is modified through the web interface of Patterns, a new pattern file is saved in the directory at the topmost of the hierarchy defined in the Drupal public files folder. The changes are stored in the database. If the file is stored originally somewhere else, it remains unchanged.
Help improve this page
Page status: Not set
You can:
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