aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/front
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2021-01-19 10:34:11 +0100
committerArthurHoaro <arthur@hoa.ro>2021-01-19 10:34:11 +0100
commitccd1862d5f6f2c0548473466aaff7ee99f9d67d2 (patch)
tree12b05377c8555f7775c83e9922b64305febfac9e /application/front
parent544bbdaf8399c7a9e3c1e8b880e6f0a2fa15a769 (diff)
downloadShaarli-ccd1862d5f6f2c0548473466aaff7ee99f9d67d2.tar.gz
Shaarli-ccd1862d5f6f2c0548473466aaff7ee99f9d67d2.tar.zst
Shaarli-ccd1862d5f6f2c0548473466aaff7ee99f9d67d2.zip
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
Diffstat (limited to 'application/front')
-rw-r--r--application/front/controller/visitor/ShaarliVisitorController.php4
1 files changed, 4 insertions, 0 deletions
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
56 56
57 protected function render(string $template): string 57 protected function render(string $template): string
58 { 58 {
59 // Legacy key that used to be injected by PluginManager
60 $this->assignView('_PAGE_', $template);
61 $this->assignView('template', $template);
62
59 $this->assignView('linkcount', $this->container->bookmarkService->count(BookmarkFilter::$ALL)); 63 $this->assignView('linkcount', $this->container->bookmarkService->count(BookmarkFilter::$ALL));
60 $this->assignView('privateLinkcount', $this->container->bookmarkService->count(BookmarkFilter::$PRIVATE)); 64 $this->assignView('privateLinkcount', $this->container->bookmarkService->count(BookmarkFilter::$PRIVATE));
61 65