- Blueprints : renommage des champs (member_name, related_articles, background_video, play_links, images_gallery, external_links) et des noms de sections - Templates JSON PHP : clés de sortie et appels ->method() en camelCase - Vues Svelte (Play, Portfolio) : accès aux données alignés Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
31 lines
1 KiB
PHP
31 lines
1 KiB
PHP
<?php
|
|
|
|
$specificData = [
|
|
'tagline' => $page->tagline()->value(),
|
|
'description' => $page->description()->kt(),
|
|
'cover' => $page->cover()->toFile()?->url(),
|
|
'gallery' => $page->files()->filterBy('template', 'image')->map(function($img) {
|
|
return $img->url();
|
|
})->values(),
|
|
'impact' => $page->impact()->split(','),
|
|
'category' => $page->category()->value(),
|
|
'platforms' => $page->platforms()->split(','),
|
|
'clientName' => $page->clientName()->value(),
|
|
'appleLink' => $page->appleLink()->value(),
|
|
'androidLink' => $page->androidLink()->value(),
|
|
'webLink' => $page->webLink()->value(),
|
|
'prev' => $page->prev() ? [
|
|
'title' => $page->prev()->title()->value(),
|
|
'url' => $page->prev()->url()
|
|
] : null,
|
|
'next' => $page->next() ? [
|
|
'title' => $page->next()->title()->value(),
|
|
'url' => $page->next()->url()
|
|
] : null,
|
|
'parentUrl' => $page->parent()->url()
|
|
];
|
|
|
|
$pageData = array_merge($genericData, $specificData);
|
|
|
|
header('Content-Type: application/json');
|
|
echo json_encode($pageData);
|