DTL page : fix dynamic background

This commit is contained in:
isUnknown 2025-01-27 15:39:13 +01:00
parent 7dbfedb08c
commit 8e12988961
3 changed files with 45 additions and 14 deletions

View file

@ -11,7 +11,7 @@ tabs:
width: 2/3
required: true
background:
label: Background image
label: Image d'arrière-plan
type: files
multiple: false
width: 1/3

View file

@ -29,7 +29,8 @@ foreach ($page->presentation()->toLayouts() as $layout) {
}
$specificData = [
"presentation" => $presentation
"presentation" => $presentation,
"background" => $page->background()->isNotEmpty() ? getFileData($page->background()->toFile()) : null
];
$pageData = array_merge($genericData, $specificData);