fix #15
This commit is contained in:
parent
1e91353c86
commit
fc267d80d1
5 changed files with 110 additions and 51 deletions
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
<?php
|
||||
|
||||
use Kirby\Uuid\Uuid;
|
||||
|
|
@ -5,18 +6,14 @@ use Kirby\Uuid\Uuid;
|
|||
return [
|
||||
'pattern' => 'categories/(:any)',
|
||||
'action' => function ($category) {
|
||||
$kirby = kirby();
|
||||
|
||||
return Page::factory(
|
||||
[
|
||||
'slug' => '',
|
||||
'template' => 'category',
|
||||
'model' => 'categories',
|
||||
'content' => [
|
||||
return Page::factory([
|
||||
'slug' => Str::slug($category) . '-' . Uuid::generate(),
|
||||
'template' => 'category',
|
||||
'model' => 'category',
|
||||
'content' => [
|
||||
'title' => $category,
|
||||
'uuid' => Uuid::generate(),
|
||||
]
|
||||
]
|
||||
);
|
||||
],
|
||||
]);
|
||||
}
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue