diff --git a/Doc/tools/sphinxext/layout.html b/Doc/tools/sphinxext/layout.html
index d4bb105e831..4b16b3f741e 100644
--- a/Doc/tools/sphinxext/layout.html
+++ b/Doc/tools/sphinxext/layout.html
@@ -2,18 +2,27 @@
{% block rootrellink %}
- {{ shorttitle }}{{ reldelim1 }}
+ Python{{ reldelim1 }}
+
+ {%- if versionswitcher is defined %}
+ {{ release }}
+ Documentation{{ reldelim1 }}
+ {%- else %}
+ {{ shorttitle }}{{ reldelim1 }}
+ {%- endif %}
+
{% endblock %}
{% block extrahead %}
{% if not embedded %}{% endif %}
+ {% if versionswitcher is defined and not embedded %}{% endif %}
{{ super() }}
{% endblock %}
{% block footer %}