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
xjmComment #22
smustgrave commentedThank you for creating this issue to improve Drupal.
We are working to decide if this task is still relevant to a currently supported version of Drupal. There hasn't been any discussion here for over 8 years which suggests that this has either been implemented or is no longer relevant. Your thoughts on this will allow a decision to be made.
Since we need more information to move forward with this issue, the status is now Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.
Thanks!
Comment #23
smustgrave commentedWanted to bump 1 more time :)