Skip to content

Commit 12747b8

Browse files
committed
rename version switcher layout file and only display if multiple permalinks
1 parent d5faed6 commit 12747b8

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<!-- Versions picker that only appears in the header on homepage or product landing -->
22
{% if page.relativePath == 'index.md' or page.layout == 'product-landing' or page.layout == 'product-sublanding' %}
3+
{% if page.permalinks and page.permalinks.length > 1 %}
34
<div class="d-md-inline-block">
45
<div class="border-top border-md-top-0 py-2 py-md-0 d-md-inline-block">
56
<details class="dropdown-withArrow position-relative details details-reset mr-md-3 close-when-clicked-outside">
@@ -27,3 +28,4 @@
2728
</details>
2829
</div>
2930
{% endif %}
31+
{% endif %}

includes/header.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ <h4 class="text-mono f5 text-normal text-gray d-md-none">{% data ui.homepage.exp
4646
</details>
4747
</div>
4848

49-
<!-- Versions picker that only appears in the header on homepage/versioned homepages -->
50-
{% include homepage-version-switcher %}
49+
<!-- Versions picker that only appears in the header on landing pages -->
50+
{% include header-version-switcher %}
5151

5252
<div class="d-md-inline-block">
5353

0 commit comments

Comments
 (0)