je ne sais plus se que contient se commit
This commit is contained in:
parent
c4892e919c
commit
309111c23a
6 changed files with 102 additions and 13 deletions
|
|
@ -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'
|
||||
]
|
||||
]
|
||||
]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue