Changed variables.
This commit is contained in:
@@ -10,7 +10,7 @@ $pt = '@novacore/samples'; //Define the view directory
|
||||
//$pt = 'samples'; //drop the core for your project
|
||||
|
||||
//Grab the slug
|
||||
$slug = $router->parameters['slug'];
|
||||
$slug = $ctx->router->parameters['slug'];
|
||||
|
||||
//build path
|
||||
$tmpl = $pt . '/' . $slug;
|
||||
@@ -26,7 +26,7 @@ if (strpos($pt, '@novacore') !== false) {
|
||||
$possibleFile = $baseDir . '/' . $slug . '.html.twig'; // add .twig extension if needed
|
||||
|
||||
if (is_file($possibleFile) && is_readable($possibleFile)) {
|
||||
view($tmpl, $data);
|
||||
view($tmpl, $ctx->data);
|
||||
} else {
|
||||
http_response_code('404');
|
||||
header("Content-Type: text/html");
|
||||
|
||||
Reference in New Issue
Block a user