All checks were successful
Deploy Production / Deploy to Production (push) Successful in 28s
Blueprint, PHP templates, Svelte view (static title + body blocks), i18n key and App routing. Page is unlisted, excluded from frontend navigation, and all panel change options are disabled. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
20 lines
393 B
PHP
20 lines
393 B
PHP
<?php
|
|
|
|
$bodyBlocks = [];
|
|
foreach ($page->body()->toBlocks() as $block) {
|
|
if ($block->type() === 'text') {
|
|
$bodyBlocks[] = [
|
|
'type' => 'text',
|
|
'html' => $block->content()->text()->value(),
|
|
];
|
|
}
|
|
}
|
|
|
|
$specificData = [
|
|
'body' => $bodyBlocks,
|
|
];
|
|
|
|
$pageData = array_merge($genericData, $specificData);
|
|
|
|
header('Content-Type: application/json');
|
|
echo json_encode($pageData);
|