aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/render/PageBuilder.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-06-13 11:22:14 +0200
committerArthurHoaro <arthur@hoa.ro>2020-07-23 21:19:21 +0200
commit818b3193ffabec57501e3bdfa997206e3c0671ef (patch)
treef5a4d3cc23ac367dde617b849561177fc20d767a /application/render/PageBuilder.php
parentc22fa57a5505fe95fd01860e3d3dfbb089f869cd (diff)
downloadShaarli-818b3193ffabec57501e3bdfa997206e3c0671ef.tar.gz
Shaarli-818b3193ffabec57501e3bdfa997206e3c0671ef.tar.zst
Shaarli-818b3193ffabec57501e3bdfa997206e3c0671ef.zip
Explicitly define base and asset path in templates
With the new routes, all pages are not all at the same folder level anymore (e.g. /shaare and /shaare/123), so we can't just use './' everywhere. The most consistent way to handle this is to prefix all path with the proper variable, and handle the actual path in controllers.
Diffstat (limited to 'application/render/PageBuilder.php')
-rw-r--r--application/render/PageBuilder.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/application/render/PageBuilder.php b/application/render/PageBuilder.php
index d90ed58b..2779eb90 100644
--- a/application/render/PageBuilder.php
+++ b/application/render/PageBuilder.php
@@ -149,6 +149,10 @@ class PageBuilder
149 */ 149 */
150 protected function finalize(): void 150 protected function finalize(): void
151 { 151 {
152 //FIXME - DEV _ REMOVE ME
153 $this->assign('base_path', '/Shaarli');
154 $this->assign('asset_path', '/Shaarli/tpl/default');
155
152 // TODO: use the SessionManager 156 // TODO: use the SessionManager
153 $messageKeys = [ 157 $messageKeys = [
154 SessionManager::KEY_SUCCESS_MESSAGES, 158 SessionManager::KEY_SUCCESS_MESSAGES,