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 →

LangSwitcher Plugin : New parameter to hide the active language

plugins

Started by Yeromnis 3 years ago · 0 replies · 1030 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, 4 weeks ago
2 345 3 weeks ago
Showcase · by chraebsli, 4 weeks ago
0 192 4 weeks ago
Showcase · by Paul Hibbitts, 1 month ago
0 728 1 month ago
Showcase · by Anthony L., 3 months ago
3 1009 2 months ago
Showcase · by lynbor, 2 months ago
0 721 2 months ago