{{/* Expect to have context bound to ".ctx", and the top level "version" and "pageUrl" passed in with the context. */}} {{/* In the current "ctx" the file path refers to the doc we are linking to, not the page we are on */}} {{- $contentVersion := index (split .ctx.File.Path "/") 1 -}} {{- $isRoot := eq (len (split .ctx.File.Path "/")) 2 -}} {{- $isThisPage := eq .ctx.Permalink .pageUrl -}} {{- $title := cond (isset .ctx.Params "navtitle") (.ctx.Params.navtitle) .ctx.Title -}} {{- if not $isRoot -}} {{- if eq .version $contentVersion -}} {{- $linkRef := .ctx.Permalink -}} {{ $title }} {{- if $isThisPage -}}
{{- end -}} {{- end -}} {{- end -}}