You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
556 B
28 lines
556 B
2 months ago
|
<?php
|
||
|
|
||
|
use Kirby\Toolkit\I18n;
|
||
|
|
||
|
return function (array $props) {
|
||
|
$props['sections'] = [
|
||
|
'files' => [
|
||
|
'label' => $props['label'] ?? $props['headline'] ?? I18n::translate('files'),
|
||
|
'type' => 'files',
|
||
|
'layout' => $props['layout'] ?? 'cards',
|
||
|
'template' => $props['template'] ?? null,
|
||
|
'image' => $props['image'] ?? null,
|
||
|
'info' => '{{ file.dimensions }}'
|
||
|
]
|
||
|
];
|
||
|
|
||
|
// remove global options
|
||
|
unset(
|
||
|
$props['headline'],
|
||
|
$props['label'],
|
||
|
$props['layout'],
|
||
|
$props['template'],
|
||
|
$props['image']
|
||
|
);
|
||
|
|
||
|
return $props;
|
||
|
};
|