Advertising sustains the DA. Ads are hidden for members. Join today

Contributed module documentation

Components

The Components module makes it easier for a theme to organize its components. It allows themes (and modules) to register Twig namespaces and provides some additional Twig functions and filters for use in Drupal templates.

Understanding Twig namespaces

Understanding what Twig namespaces are and why you would use them

Registering Twig namespaces

Understanding how to create the Twig namespaces used in the @namespace/template.html.twig syntax

Twig filters: add(), set(), recursive_merge()

Twig filters added by Components module

Twig functions: template()

Twig functions added by Components module

Upgrade Guide: 1.x to 2.x

Short HowTo's to facilitate upgrading from 1.x to 2.x

Guide maintainers

johnalbin's picture