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 . }}
{{ $titles = $titles | append (slice ( .Title | plainify ) )}}
{{ if .Sections }}
{{ $titles = $titles | append ( partialCached "cv/organisations/recursive-children-titles.html" .Sections .Title) }}
{{ end }}
{{ $titles = $titles | append (slice ( .Title | plainify ) ) }}
{{ if .Sections }}
{{ $titles = $titles | append ( partial "cv/organisations/recursive-children-titles.html" .Sections ) }}
{{ end }}
{{ end }}
{{ return $titles }}

View file

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

View file

@ -6,7 +6,7 @@
{{ if ne .c.Parent.Type "cv/organisations" }}
{{ with .c.Parent }}
{{ $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 }}