Skip to content
Snippets Groups Projects
Commit 9ac25d96 authored by Alexis BENOIT's avatar Alexis BENOIT
Browse files

test partial get param or data

parent c8c84a95
No related branches found
No related tags found
No related merge requests found
taxonomy:
layout:
options:
truncate:
term:
layout:
options:
truncate:
image_sizes:
section:
single:
layouts:
list:
grid:
cards:
index:
highlight_exhibitions:
active: true
current:
layout: list
options:
dates: true
categories: true
image: true
status: false
subtitle: true
summary: true
\ No newline at end of file
section:
layout:
options:
truncate:
single:
layout:
options:
truncate:
image_sizes:
section:
single:
layouts:
list:
grid:
cards:
......@@ -114,14 +114,24 @@ params:
group_by_date: "Monday 2 January <span>2006</span>"
highlight_exhibitions:
active: true
layout: grid
options:
dates: true
categories: true
image: true
status: false
subtitle: true
summary: true
current:
layout: grid
options:
dates: true
categories: true
image: true
status: false
subtitle: true
summary: true
future:
layout: list
options:
dates: true
categories: true
image: false
status: false
subtitle: true
summary: false
layout: agenda # grid | list
options:
dates: false
......
{{ $param := site.Params }}
{{ range (split . ".") }}
{{ $param = index $param . }}
{{ end }}
{{ if not $param }}
{{ $param = site.Data.types }}
{{ range (split . ".") }}
{{ $param = index $param . }}
{{ end }}
{{ end }}
{{ return $param }}
\ No newline at end of file
{{ $layout := site.Params.events.index.highlight_exhibitions.layout }}
{{ $options := site.Params.events.index.highlight_exhibitions.options }}
{{ $exhibitions := where .Site.RegularPages "Section" "exhibitions" }}
{{ $current_exhibitions := where $exhibitions "Params.dates.status" "current" }}
{{ $future_exhibitions := where $exhibitions "Params.dates.status" "future" }}
{{ $appearance := "" }}
<div class="exhibitions">
{{/* TODO : il n'y a pas de titre dans la maquette, mais est-ce clair sans titre pour cette partie ? */}}
{{ with $current_exhibitions }}
<h2>En ce moment</h2>
{{ $appearance = partial "GetParamOrData" "events.index.highlight_exhibitions.current" }}
{{ partial "exhibitions/partials/exhibitions.html" (dict
"exhibitions" .
"heading_level" 3
"layout" $layout
"options" $options
"layout" $appearance.layout
"options" $appearance.options
)}}
{{ end }}
{{ with $future_exhibitions }}
<h2>Bientôt</h2>
{{ $appearance = partial "GetParamOrData" "events.index.highlight_exhibitions.future" }}
{{ partial "exhibitions/partials/exhibitions.html" (dict
"exhibitions" .
"heading_level" 3
"layout" $layout
"options" $options
"layout" $appearance.layout
"options" $appearance.options
)}}
{{ end }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment