Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This project is not covered by Drupal’s security advisory policy.
Readme
This small module will help integrating a pattern library (pattern lab, myagi, you name it) with a drupal backend. Instead of declaring a custom theme-hook and including a pattern into your custom template you can just call pattern(<category>, <name>, <arguments>)
.
Installation
Install the module as usual
Usage
To render a pattern, just use the pattern-helper-function:
in PHP:
$render_array = pattern('atoms', 'button', ['label' => 'hello world']);
in twig:
{% set output = pattern('atoms', 'button', { label: 'hello world' } %}
{{ output }}
Supporting organizations:
Development
Project information
- Module categories: Developer Tools
- Ecosystem: Templates, Twig Filter, Components
- Created by D34dMan on , updated
- This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.