- 🇫🇷France andypost
Probably could be closed as duplicate of ✨ Add a "context" array variable to all theme hooks and "#context" array property to all elements to provide optional contextual data Needs work
#3064854: Allow Twig templates to use front matter for metadata support → introduces the ability for Twig templates to contain front matter metadata.
It would be very helpful to themes to also supply this information to preprocess functions.
One strong use-case being to preprocess the same type of theme hook/template, but for different supported versions where the markup or render structure may have changed between versions.
For example, in Drupal Bootstrap, there could be two templates that are for the same theme hook, but one specifies:
---
bootstrap:
version: >=3.0.0 <4.0.0
---
While the other template specifies:
---
bootstrap:
version: >=4.0.0 <5.0.0
---
Being able to access this data in a preprocess function is vital to determine which version of the theme hook/template should be rendered.
TBD
Possible solutions:
None
TBD
None
TBD
Active
11.0 🔥
Last updated
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Probably could be closed as duplicate of ✨ Add a "context" array variable to all theme hooks and "#context" array property to all elements to provide optional contextual data Needs work