Follow-up to #2168231: Twig Functions needed in templates
Problem/Motivation
There may be some variables that all your themes need to use. Example base_path()
.
Letting themes provide these global variables instead of having to make a module.
When this was added all alter hooks ran for themes and it was documented that themes were able to use this: https://www.drupal.org/node/1838470
Proposed resolution
Add ThemeHandeler->alter()
to _template_preprocess_default_variables()
User interface changes
N/A
API changes
N/A
Comment | File | Size | Author |
---|---|---|---|
#5 | themes_should_be_able-2612196-5.patch | 3.72 KB | joelpittet |
#2 | global_template-2612196-2.patch | 715 bytes | joelpittet |
Comments
Comment #2
joelpittetComment #3
star-szrMore active title :)
Probably could use a little test I think?
Comment #5
joelpittetTests and working code:) Will still fail because I don't know how to test the active theme very well... or it's not working.
Comment #7
star-szrAdded reference to https://www.drupal.org/node/1838470 to the IS.
Comment #8
xjm