dynamize projects

This commit is contained in:
isUnknown 2024-09-04 11:28:12 +02:00
parent 3f9c8bbebf
commit edd9e66efb
10 changed files with 417 additions and 291 deletions

View file

@ -0,0 +1,18 @@
<?php
$children = $page->children()->map(function ($child) {
return [
'title' => $child->title()->value(),
'url' => $child->url(),
'modified' => $child->modified('Y-m-d'),
'status' => $child->status()
];
})->values();
$specificData = [
"children" => $children,
];
$data = array_merge($genericData, $specificData);
echo json_encode($data);

View file

@ -0,0 +1 @@
<?php snippet('generic-template') ?>