1
0

downgrade to kirby v3

This commit is contained in:
Philip Wagner
2024-09-01 10:47:15 +02:00
parent a4b2aece7b
commit af86acb7a1
1085 changed files with 54743 additions and 65042 deletions

View File

@@ -6,12 +6,12 @@ return function (array $props) {
// load the general templates setting for all sections
$templates = $props['templates'] ?? null;
$section = function ($label, $status, $props) use ($templates) {
$section = function ($headline, $status, $props) use ($templates) {
$defaults = [
'label' => $label,
'type' => 'pages',
'layout' => 'list',
'status' => $status
'headline' => $headline,
'type' => 'pages',
'layout' => 'list',
'status' => $status
];
if ($props === true) {
@@ -20,13 +20,13 @@ return function (array $props) {
if (is_string($props) === true) {
$props = [
'label' => $props
'headline' => $props
];
}
// inject the global templates definition
if (empty($templates) === false) {
$props['templates'] ??= $templates;
$props['templates'] = $props['templates'] ?? $templates;
}
return array_replace_recursive($defaults, $props);