This commit is contained in:
isUnknown 2024-10-09 16:32:10 +02:00
parent 276876cec9
commit 4b71e9cf04
37 changed files with 501 additions and 169 deletions

View file

@ -0,0 +1,11 @@
title: Images ressources
tabs:
contenTab:
label: Contenu
sections:
filesSection:
label: Images
type: files
layout: cards
template: image

View file

@ -0,0 +1,21 @@
<?php
$images = [];
foreach ($page->files() as $image) {
$images[] = [
'url' => $image->url(),
'uuid' => (string) $image->uuid(),
'tags' => $image->tags()->split(),
'name' => $image->filename(),
'description' => $image->description()->value(),
];
}
$specificData = [
"images" => $images
];
$data = array_merge($genericData, $specificData);
echo json_encode($data);

View file

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