Update Inspirations view, components and json template
This commit is contained in:
parent
4cf00533d0
commit
d79f195913
3 changed files with 239 additions and 8 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue