sandname singular in dotawo...
This commit is contained in:
parent
26c20737d6
commit
a110acf3c0
1 changed files with 9 additions and 2 deletions
|
@ -9,6 +9,8 @@
|
|||
{{ $scratch := $s.Get $currentFile }}
|
||||
|
||||
{{ $sandnamePlural := (slice) }}
|
||||
{{ $sandnameSingular := "" }}
|
||||
{{ $mentionLink := "" }}
|
||||
|
||||
<div class="{{ $scratch.depth | default "crust" }}title"><span class="supt">{{ substr $currentDir 0 -1 }}⁄</span>{{ .Title }}</div>
|
||||
|
||||
|
@ -31,12 +33,17 @@
|
|||
{{ $mentions := intersect $paramsKeys $sandnamePlural }}
|
||||
{{ range $mention := $mentions }}
|
||||
{{ range $k, $m := index $currentNode.Params $mention }}
|
||||
{{ $mentionLink := printf "/%s/%s" (substr $mention 0 -1) $m }}
|
||||
{{ range $k, $v := $.Site.Data.sandpointsnamegraph }}
|
||||
{{ if eq $v $mention }}
|
||||
{{ $mentionLink = printf "/%s/%s" $k $m }}
|
||||
{{ $sandnameSingular = $k }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{- with $.GetPage $mentionLink -}}
|
||||
{{- with not $k -}}
|
||||
{{ $closeDivs = true }}
|
||||
<div class="has hasauthors">
|
||||
<div class="hassup">{{ with (index $currentNode.Params $mention) }}{{ if gt (len (index $currentNode.Params $mention)) 1 }}{{ $mention }}{{ else }}{{ substr $mention 0 -1 }}{{ end }}{{ end }}⁄</div>
|
||||
<div class="hassup">{{ with (index $currentNode.Params $mention) }}{{ if gt (len (index $currentNode.Params $mention)) 1 }}{{ $mention }}{{ else }}{{ $sandnameSingular }}{{ end }}{{ end }}⁄</div>
|
||||
<div class="afterhas">
|
||||
{{- end -}}
|
||||
<div class="crust">
|
||||
|
|
Loading…
Add table
Reference in a new issue