Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New config param: hide_active #75

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions langswitcher.yaml
Expand Up @@ -3,3 +3,4 @@ built_in_css: true
translated_urls: true
untranslated_pages_behavior: none
language_display: long
hide_active: true
2 changes: 1 addition & 1 deletion templates/partials/langswitcher.html.twig
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 %}