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.

Showcase

LangSwitcher Plugin : New parameter to hide the active language

plugins

Started by Yeromnis 3 years ago · 0 replies · 415 views
3 years ago

Hi, I forked the LangSwitcher Plugin to add this config parameter (in langswitcher.yaml):
hide_active: true
just to hide the active language from the menu (i.e. I don't need to show 'English' if the page is already in English)
and that parameter is taken into account in the modified templates/partials/langswitcher.html.twig

It was for my own need, happy coding to all!

See:
https://github.com/Yeromnis/grav-plugin-langswitcher
https://github.com/getgrav/grav-plugin-langswitcher/pull/75/files

Suggested topics

Topic Participants Replies Views Activity
Showcase · by Julien Perret, 3 months ago
3 133 1 month ago
Showcase · by Julien Perret, 2 months ago
4 142 2 months ago
Showcase · by Stuart, 5 months ago
1 124 5 months ago
Showcase · by Gez, 8 months ago
4 255 8 months ago
Showcase · by Roger Parkinson, 10 months ago
0 110 10 months ago