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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Archive

Test if a plugin is enabled with a plugin name like my-plugin-name

Started by Muut Archive 10 years ago · 2 replies · 424 views
10 years ago

hi everyone !
I'm trying to test if a plugin is enabled, it's super easy just check config.plugins array, but it doesn't work with a plugin name with more than two words separated with a dash like my-plugin-name
I think i miss something in twig

--- twig
{% if config.plugins.my-plugin-name.enabled %}
<span>Plugin enabled</span>
{% endif %}

TXT


Thanks a lot for tips
10 years ago

@Perlkönig that's it thanks for your help

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1281 9 years ago
Archive · by Muut Archive, 9 years ago
2 888 9 years ago
Archive · by Muut Archive, 9 years ago
2 4018 9 years ago
Archive · by Muut Archive, 9 years ago
1 2894 9 years ago
Archive · by Muut Archive, 9 years ago
3 1077 9 years ago