File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 99 </ label >
1010 </ div >
1111
12- {{ $relPermalink := .RelPermalink }}
13- {{ $productIdentifier := index ((split $relPermalink "/")) 1 }}
14- {{ $relPermalink := strings.TrimSuffix "/" $productIdentifier }}
12+ {{ $relPermalink := .RelPermalink | strings.TrimPrefix "/" | strings.TrimSuffix "/" }}
1513 {{ $currentProductTitle := "" }}
1614
1715 {{ with index .Site.Data "product-selector" }}
1816 {{ range $group := . }}
1917 {{ range $product := $group.products }}
20- {{ $splitProductUrl := index ((split $product.url "/")) 1 }}
21- {{ $suffixProductUrl := strings.TrimSuffix "/" $splitProductUrl | }}
22- {{ $prefixProductUrl := strings.TrimPrefix "/" $suffixProductUrl | }}
23- {{ if (eq $prefixProductUrl $productIdentifier) }}
24- {{ $currentProductTitle = $product.title }}
18+ {{ if not $product.extUrl }}
19+ {{ $productUrl := $product.url | strings.TrimPrefix "/" | strings.TrimSuffix "/" }}
20+ {{ if eq $productUrl $relPermalink }}
21+ {{ $currentProductTitle = $product.title }}
22+ {{ end }}
2523 {{ end }}
2624 {{ end }}
2725 {{ end }}
You can’t perform that action at this time.
0 commit comments