560 B
560 B
{{- $pid := or (.Get "pid") (.Get "page") -}}
{{- this :=
.Page -}}
{{- $title := .Get "title" -}}
{{- $linkid := or ($this.Scratch.Get "linkid") 1 -}}
{{- $this.Scratch.Set "linkid" (add $linkid 1) -}}
{{- $pages := where .Site.RegularPages "Params.pageid" "eq" $pid -}}
{{- $btext := or (.Get "btext") (printf "%d" $linkid) -}}
{{- $btitle := .Get "btitle" -}}
{{- $anchor := printf "link-%d" $linkid -}}
{{- range $pages -}}
{{- if ne $title "none" -}}
[{{ or $title .Title }}]({{ .Permalink }})
{{- end -}} {{ .RenderShortcodes }} {{- end -}}