Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

LangSwitcher Plugin : New parameter to hide the active language

plugins

Started by Yeromnis 3 years ago · 0 replies · 878 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 Anthony L., 2 months ago
3 661 1 week ago
Showcase · by lynbor, 4 weeks ago
0 420 4 weeks ago
Showcase · by francois_fuchs, 1 month ago
3 519 1 month ago
Showcase · by kskt, 2 months ago
2 591 2 months ago
Showcase · by Andy Miller, 3 months ago
2 1005 2 months ago