Bloc "Pour aller plus loin"
This commit is contained in:
27
themes/2026/layouts/_partials/article-pages-block.html
Normal file
27
themes/2026/layouts/_partials/article-pages-block.html
Normal file
@@ -0,0 +1,27 @@
|
||||
{{- $title := "" -}}
|
||||
{{- $class := "" -}}
|
||||
{{- $pages := slice -}}
|
||||
{{- $showDossierBeforeTitle := false -}}
|
||||
{{- if reflect.IsMap . -}}
|
||||
{{- with .Title -}}
|
||||
{{- $title = . -}}
|
||||
{{- end -}}
|
||||
{{- with .Class -}}
|
||||
{{- $class = . -}}
|
||||
{{- end -}}
|
||||
{{- with .Pages -}}
|
||||
{{- $pages = . -}}
|
||||
{{- end -}}
|
||||
{{- if isset . "ShowDossierBeforeTitle" -}}
|
||||
{{- $showDossierBeforeTitle = index . "ShowDossierBeforeTitle" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- if and (ne $title "") (gt (len $pages) 0) -}}
|
||||
<section class="article-aside-block article-page-links{{ with $class }} {{ . }}{{ end }}">
|
||||
<h2>{{ $title }}</h2>
|
||||
{{- partial "articles-list.html" (dict
|
||||
"Pages" $pages
|
||||
"ShowDossierBeforeTitle" $showDossierBeforeTitle
|
||||
) -}}
|
||||
</section>
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user