dynamize projects
This commit is contained in:
parent
3f9c8bbebf
commit
edd9e66efb
10 changed files with 417 additions and 291 deletions
18
public/site/templates/projects.json.php
Normal file
18
public/site/templates/projects.json.php
Normal 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);
|
||||
1
public/site/templates/projects.php
Normal file
1
public/site/templates/projects.php
Normal file
|
|
@ -0,0 +1 @@
|
|||
<?php snippet('generic-template') ?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue