Update Inspirations view, components and json template

This commit is contained in:
Timothée Goguely 2024-09-09 20:03:24 +02:00
parent 4cf00533d0
commit d79f195913
3 changed files with 239 additions and 8 deletions

View file

@ -1,8 +1,16 @@
<?php
$children = $page->children()->map(function ($child) {
return [
'title' => $child->title()->value(),
'url' => $child->url(),
'modified' => $child->modified('Y-m-d'),
'media' => $child->media()->toFiles()
];
})->values();
$specificData = [
"exampleField" => $page->exampleField(),
"exampleHardData" => 'Example hard value'
"children" => $children,
];
$data = array_merge($genericData, $specificData);