hotfix: fix cloud names in product dropdown
parent
3f8f0e0c5b
commit
5a3dce0f26
|
@ -9,20 +9,22 @@
|
|||
{{ $altEngine := .Page.Params.alt_engine | default "" }}
|
||||
{{ $sortedProducts := sort .Site.Data.products "list_order" "asc"}}
|
||||
|
||||
|
||||
|
||||
<div class="dropdown">
|
||||
{{ if or (eq $product nil) (eq $product "platform") (eq $product "resources") }}
|
||||
<p class="selected">Select product</p>
|
||||
{{ else if or $isCloud $isIOx $isDedicated }}
|
||||
{{ $scratch.Set "cloud-type" "" }}
|
||||
{{ if $isCloud }}{{ $scratch.Set "cloud-type" $.Site.Data.products.influxdb_cloud.altname}}
|
||||
{{ else if $isIOx }}{{ $scratch.Set "cloud-type" $.Site.Data.products.influxdb_cloud_serverless.altname }}
|
||||
{{ else if $isDedicated }}{{ $scratch.Set "cloud-type" $.Site.Data.products.influxdb_cloud_dedicated.altname }}
|
||||
{{ end }}
|
||||
{{ $cloudType := $scratch.Get "cloud-type" }}
|
||||
<p class="selected">{{ $cloudType }}</p>
|
||||
{{ else }}
|
||||
{{ $productData := (index .Site.Data.products $product) }}
|
||||
<p class="selected">{{ if $productData.altname }}{{ $productData.altname }}{{ else }}{{ $productData.name }}{{ end }}</p>
|
||||
{{ $scratch.Set "displayName" "" }}
|
||||
{{ if $isCloud }}{{ $scratch.Set "displayName" $.Site.Data.products.influxdb_cloud.name}}
|
||||
{{ else if $isIOx }}{{ $scratch.Set "displayName" $.Site.Data.products.influxdb_cloud_serverless.name }}
|
||||
{{ else if $isDedicated }}{{ $scratch.Set "displayName" $.Site.Data.products.influxdb_cloud_dedicated.name }}
|
||||
{{ else }}
|
||||
{{ $productData := (index .Site.Data.products $product) }}
|
||||
{{ $scratch.Set "displayName" (cond (isset $productData "altname") $productData.altname $productData.name) }}
|
||||
{{ end }}
|
||||
{{ $displayName := $scratch.Get "displayName" }}
|
||||
<p class="selected">{{ $displayName }}</p>
|
||||
{{ end }}
|
||||
|
||||
<ul class="item-list products" data-category="Managed">
|
||||
|
@ -35,14 +37,14 @@
|
|||
|
||||
{{/* ////////////////// BEGIN IOx WAYFINDING LOGIC ////////////////// */}}
|
||||
|
||||
{{ else if and $isCloud (eq .altname "InfluxDB Cloud Serverless")}}
|
||||
{{ else if and $isCloud (eq .name "InfluxDB Cloud Serverless")}}
|
||||
{{ $altIOxPage := $.GetPage ((replaceRE "influxdb/cloud" "influxdb/cloud-serverless" $.Page.RelPermalink) | replaceRE `\/$` "") }}
|
||||
{{ if ne $altEngine "" }}
|
||||
{{ $scratch.Set "link" $altEngine }}
|
||||
{{ else if gt (len $altIOxPage.Title) 0 }}
|
||||
{{ $scratch.Set "link" $altIOxPage.RelPermalink }}
|
||||
{{ end }}
|
||||
{{ else if and $isIOx (eq .altname "InfluxDB Cloud (TSM)")}}
|
||||
{{ else if and $isIOx (eq .name "InfluxDB Cloud (TSM)")}}
|
||||
{{ $altCloudPage := $.GetPage ((replaceRE "influxdb/cloud-serverless" "influxdb/cloud" $.Page.RelPermalink) | replaceRE `\/$` "") }}
|
||||
{{ if ne $altEngine "" }}
|
||||
{{ $scratch.Set "link" $altEngine }}
|
||||
|
@ -72,7 +74,7 @@
|
|||
{{ end }}
|
||||
{{ $link := $scratch.Get "link" }}
|
||||
<li>
|
||||
<a href='{{ $link }}' {{ if $isCurrentProduct }}class="active"{{ end }}>{{ if .altname }}{{.altname}}{{ else }}{{ .name }}{{ end }}</a>
|
||||
<a href='{{ $link }}' {{ if $isCurrentProduct }}class="active"{{ end }}>{{ .name }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in New Issue