fix: replace recursive partialCached with partial

This commit is contained in:
Ben Goldsworthy 2025-05-05 21:05:15 +02:00
parent 607686468d
commit 5a1e4fc252
No known key found for this signature in database
3 changed files with 7 additions and 8 deletions

View file

@ -1,11 +1,10 @@
{{ $titles := ( slice )}} {{ $titles := ( slice ) }}
{{ range . }} {{ range . }}
{{ $titles = $titles | append (slice ( .Title | plainify ) )}} {{ $titles = $titles | append (slice ( .Title | plainify ) ) }}
{{ if .Sections }} {{ if .Sections }}
{{ $titles = $titles | append ( partialCached "cv/organisations/recursive-children-titles.html" .Sections .Title) }} {{ $titles = $titles | append ( partial "cv/organisations/recursive-children-titles.html" .Sections ) }}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ return $titles }} {{ return $titles }}

View file

@ -10,7 +10,7 @@
</a> </a>
{{- range .Sections -}} {{- range .Sections -}}
<ul> <ul>
{{- partialCached "cv/organisations/recursive-children.html" . .Title -}} {{- partial "cv/organisations/recursive-children.html" . -}}
</ul> </ul>
{{- end -}} {{- end -}}
{{- end -}} {{- end -}}

View file

@ -6,7 +6,7 @@
{{ if ne .c.Parent.Type "cv/organisations" }} {{ if ne .c.Parent.Type "cv/organisations" }}
{{ with .c.Parent }} {{ with .c.Parent }}
{{ $scratch.Add "parents" ( slice . ) }} {{ $scratch.Add "parents" ( slice . ) }}
{{ partialCached "cv/organisations/recursive-parents.html" (dict "c" . "g" $.g ) .Title }} {{ partial "cv/organisations/recursive-parents.html" (dict "c" . "g" $.g ) }}
{{ end }} {{ end }}
{{ end }} {{ end }}
{{ end }} {{ end }}