{{ if eq site.Params.persons.index.layout "list" }}
    {{ range .persons }} {{ partial "persons/list-item" . }} {{ end }}
{{ else if eq site.Params.persons.index.layout "grid" }}
{{ range .persons }} {{ partial "persons/person" . }} {{ end }}
{{ end }}