Initial public commit

This commit is contained in:
2016-08-15 18:47:13 +02:00
commit bbc99c6967
67 changed files with 1517 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
<?php
// Determine snippet name and fall back to default if it does not exist
$snippet = 'templates/' . $page->intendedTemplate();
if(!$kirby->get('snippet', $snippet)) $snippet = 'templates/default';
// Define structured data for the frontend AJAX code
$data = [
'url' => $page->url(),
'cachable' => $page->isCachable(),
'title' => $page->title() . ' ~ ' . site()->title(),
'nav' => snippet('nav', [], true),
'main' => snippet($snippet, [], true)
];
// Return it as JSON
echo response::json($data);