fix #5 - Menu : dynamize inspirations 'Nouveautés' label
This commit is contained in:
parent
b14f33e3fa
commit
955b8531a1
3 changed files with 15 additions and 23 deletions
|
|
@ -1,22 +1,9 @@
|
|||
type: pages
|
||||
headline: Inspirations
|
||||
template: inspiration
|
||||
layout: table
|
||||
columns:
|
||||
title:
|
||||
label: Titre
|
||||
width: 3/12
|
||||
date:
|
||||
label: Date
|
||||
value: "{{ page.date.toDate('YY/MM') }}"
|
||||
width: 1/12
|
||||
new:
|
||||
label: Nouveauté
|
||||
width: 1/12
|
||||
description:
|
||||
width: 7/12
|
||||
empty: Pas encore d’inspiration
|
||||
image:
|
||||
layout: cards
|
||||
image:
|
||||
query: page.cover.toFile
|
||||
cover: true
|
||||
search: true
|
||||
search: true
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ return function ($page, $kirby, $site) {
|
|||
}
|
||||
$data = $page->toArray();
|
||||
$data['template'] = (string) $page->template();
|
||||
$data['newInspirations'] = (bool) page('inspirations')->children()->findBy('new', 'true');
|
||||
|
||||
$userData = [
|
||||
"role" => (string) $kirby->user()->role(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue