Skip to content

Commit

Permalink
Update langswitcher.html.twig
Browse files Browse the repository at this point in the history
Add a new boolean parameter 'hide_active' to hide/show the current language item in the menu.
  • Loading branch information
Yeromnis authored Jun 19, 2023
1 parent b90de47 commit baf7a78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/partials/langswitcher.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
{% endblock %}

{% block language_item %}
{% if show_language %}
{% if show_language and not (active_class and grav.config.plugins.langswitcher.hide_active) %}
<li><a href="{{ lang_url ~ uri.params ~ (uri.query|length > 1 ? '?' ~ uri.query) }}" class="external {{ active_class }}">{% include 'partials/langswitcher-' ~ display_format ~ '.html.twig' %}</a></li>
{% endif %}
{% endblock %}

0 comments on commit baf7a78

Please sign in to comment.