1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-23 05:16:03 +02:00

feat(admin-plugin): add ability to get query inside twig templates #186

This commit is contained in:
Awilum
2019-08-23 14:43:10 +03:00
parent 66514e95ae
commit 3fc0fc38ce

View File

@@ -85,9 +85,9 @@ class SiteController extends Controller
$path = 'themes/' . $this->registry->get('settings.theme') . '/' . (empty($this->entry['template']) ? 'templates/default' : 'templates/' . $this->entry['template']) . '.html';
if ($is_entry_not_found) {
return $this->view->render($response->withStatus(404), $path, ['entry' => $this->entry]);
return $this->view->render($response->withStatus(404), $path, ['entry' => $this->entry, 'query' => $query]);
}
return $this->view->render($response, $path, ['entry' => $this->entry, 'page' => $query['page'] ?? '']);
return $this->view->render($response, $path, ['entry' => $this->entry, 'query' => $query]);
}
}