Add banner based on language #7174
Unanswered
YozoraXCII
asked this question in
Q&A
Replies: 1 comment
-
Hello @YozoraXCII, But lets say you're going to stick with this approach, then you can add a banner to the
and the contents would be decided based on a conditional using the Something similar to this should suffice, in your {% extends "base.html" %}
{% block announce %}
Check how the value looks like -> page.file.dest_uri = {% page.file.dest_uri %}
{% if page.file.dest_uri.startswith("en/latest") %}
...
{% elif page.file.dest_uri.startswith("en/develop") %}
...
{% else %}
...
{% endif %}
{% endblock %} |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I use the
alternate
feature to switch between different branches of my documentation (latest, develop, nightly).I want to add a warning banner to every page either above or below the navigation bar highlighting to the user "You are currently viewing the nightly/develop version of the documentation, [click here] to go to the latest version"
Any suggested ways of achieving this?
Beta Was this translation helpful? Give feedback.
All reactions