design article title and add author virtual page
This commit is contained in:
parent
6fe73efbcf
commit
2114fbbb8e
12 changed files with 129 additions and 25 deletions
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
use Kirby\Uuid\Uuid;
|
||||
|
||||
return [
|
||||
'debug' => true,
|
||||
'panel' => [
|
||||
|
|
@ -44,5 +46,25 @@ return [
|
|||
'comments',
|
||||
'system'
|
||||
]
|
||||
]
|
||||
],
|
||||
'routes' => [
|
||||
[
|
||||
'pattern' => 'auteur/(:any)',
|
||||
'action' => function ($slug) {
|
||||
$kirby = kirby();
|
||||
$author = getAuthorBySlug($slug);
|
||||
|
||||
return Page::factory([
|
||||
'slug' => '',
|
||||
'template' => 'author',
|
||||
'model' => 'authors',
|
||||
'content' => [
|
||||
'title' => $author->name(),
|
||||
'presentation' => $author->presentation(),
|
||||
'uuid' => Uuid::generate(),
|
||||
]
|
||||
]);
|
||||
}
|
||||
]
|
||||
]
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue