From bd7f29c5da55a058208a4949290a12515a7122de Mon Sep 17 00:00:00 2001 From: Neil Dewhurst Date: Tue, 27 Aug 2024 16:05:52 +0100 Subject: [PATCH] Select custom label or hide label in selectors --- preview-src/labels.adoc | 2 ++ src/partials/nav-selectors.hbs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/preview-src/labels.adoc b/preview-src/labels.adoc index a9589f89..85b4fd10 100644 --- a/preview-src/labels.adoc +++ b/preview-src/labels.adoc @@ -1,4 +1,6 @@ = Labels +:page-selector-label: Custom version label +// :page-selector-hide-label: true == All the labels diff --git a/src/partials/nav-selectors.hbs b/src/partials/nav-selectors.hbs index a63a6301..495b1bf3 100644 --- a/src/partials/nav-selectors.hbs +++ b/src/partials/nav-selectors.hbs @@ -24,7 +24,7 @@ {{#if (eq this.version @root.page.version)}} selected{{/if}} {{~#if this.missing}} disabled{{/if}} > - Version {{ this.displayVersion }}{{#if (and @root.page.attributes.nav-indicate-latest (eq this.version @root.page.latest.version)) }} (latest){{/if}} + {{#unless @root.page.attributes.selector-hide-label }}{{#with (or @root.page.attributes.selector-label 'Version') }}{{{this}}} {{/with}}{{/unless}}{{ this.displayVersion }}{{#if (and @root.page.attributes.nav-indicate-latest (eq this.version @root.page.latest.version)) }} (latest){{/if}} {{/unless}} {{/each}}