je ne sais plus se que contient se commit

This commit is contained in:
antonin gallon 2026-02-09 15:36:00 +01:00
parent c4892e919c
commit 309111c23a
6 changed files with 102 additions and 13 deletions

View file

@ -7,9 +7,11 @@ Kirby::plugin('tonnom/epub-export', [
'pattern' => 'epub-export/(:any)',
'method' => 'POST',
'action' => function () {
$pageId = get('id');
$page = page($pageId);
throw new Exception($page);
throw new Exception($pageId);
if (!$page) {
throw new Exception("Page introuvable");
}
@ -37,14 +39,13 @@ Kirby::plugin('tonnom/epub-export', [
]
],
'sections' => [
'fields' => [
'epubexport' => [
'props' => [
'computed' => [
'pageId' => function () {
return $this->model()->id();
},
],
'component' => 'export-button'
]
]
]);