narrative web version
This commit is contained in:
parent
9ed028a560
commit
f6032f717d
27 changed files with 1677 additions and 7 deletions
46
public/site/config/config.php
Normal file
46
public/site/config/config.php
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
|
||||
use Kirby\Http\Response;
|
||||
|
||||
return [
|
||||
'debug' => true,
|
||||
'routes' => [
|
||||
[
|
||||
'pattern' => '(:all)/web',
|
||||
'action' => function ($path) {
|
||||
|
||||
$realPage = page($path);
|
||||
|
||||
if (!$realPage) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return new Page([
|
||||
'slug' => $realPage->slug() . '-web',
|
||||
'template' => 'narrative-web',
|
||||
// 'content' => $realPage->content()->toArray(),
|
||||
'content' => array_merge(
|
||||
$realPage->content()->toArray(),
|
||||
['originalUri' => $realPage->uri()]
|
||||
),
|
||||
]);
|
||||
}
|
||||
]
|
||||
]
|
||||
// [
|
||||
// 'pattern' => '(:all)/web',
|
||||
// 'method' => 'GET',
|
||||
// 'before' => true,
|
||||
// 'action' => function (string $path) {
|
||||
|
||||
// $page = kirby()->page($path);
|
||||
|
||||
// if (!$page) {
|
||||
// return false;
|
||||
// }
|
||||
|
||||
// return $page->render([], 'narrative-web');
|
||||
// }
|
||||
// ]
|
||||
// ]
|
||||
];
|
||||
Loading…
Add table
Add a link
Reference in a new issue