Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Antimatter theme config

Started by Muut Archive 11 years ago · 2 replies · 537 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 Muut Archive, 10 years ago
1 673 1 week ago
Archive · by Deleted User, 9 years ago
0 3043 9 years ago
Archive · by Muut Archive, 9 years ago
2 1983 9 years ago
Archive · by Muut Archive, 9 years ago
2 5337 9 years ago
Archive · by Muut Archive, 9 years ago
1 4134 9 years ago