From ccd1862d5f6f2c0548473466aaff7ee99f9d67d2 Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Tue, 19 Jan 2021 10:34:11 +0100 Subject: Inject current template name in templates Use either legacy key _PAGE_ or new 'template' one. Related to https://github.com/kalvn/Shaarli-Material/issues/118 --- application/front/controller/visitor/ShaarliVisitorController.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'application') diff --git a/application/front/controller/visitor/ShaarliVisitorController.php b/application/front/controller/visitor/ShaarliVisitorController.php index ae946c59..d3f28f2f 100644 --- a/application/front/controller/visitor/ShaarliVisitorController.php +++ b/application/front/controller/visitor/ShaarliVisitorController.php @@ -56,6 +56,10 @@ abstract class ShaarliVisitorController protected function render(string $template): string { + // Legacy key that used to be injected by PluginManager + $this->assignView('_PAGE_', $template); + $this->assignView('template', $template); + $this->assignView('linkcount', $this->container->bookmarkService->count(BookmarkFilter::$ALL)); $this->assignView('privateLinkcount', $this->container->bookmarkService->count(BookmarkFilter::$PRIVATE)); -- cgit v1.2.3