Skip to content
Grav 2.0 is officially stable. Read the announcement →
Archive

Antimatter theme config

Started by Muut Archive 11 years ago · 2 replies · 334 views
11 years ago

appears to be in antimatter.yaml
i wanted to access the theme config from within a modu,le twig file (eg showcase.html.twig) but the variable is not defined here. I see that module extends partial/base which defines this variable. so i assumed it would be defined. but no.
sorry, this is due to my lack of twig understanding. I do think that the config should be accessilble from the modules.

11 years ago

You can access any configuration from anywhere, you just need to know how.. it's pretty easy from twig:

TWIG
{% set dropdown_status = grav.config.themes.antimatter.dropdown.enabled %}

To know what and where things are you can look in the cached config object that represents all configuration as big array in cache/compiled/config/master-localhost.php (or whatever it's called for you)

👍 1

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1345 9 years ago
Archive · by Muut Archive, 9 years ago
2 933 9 years ago
Archive · by Muut Archive, 9 years ago
2 4060 9 years ago
Archive · by Muut Archive, 9 years ago
1 2945 9 years ago
Archive · by Muut Archive, 9 years ago
3 1117 9 years ago