mirror of
https://github.com/openvk/chandler.git
synced 2025-03-10 11:29:41 +03:00
Add ability to change template search path
Signed-off-by: Celestora <kitsuruko@gmail.com>
This commit is contained in:
parent
5855601d59
commit
01338ff6ec
1 changed files with 6 additions and 2 deletions
|
@ -142,8 +142,12 @@ class Router
|
||||||
#TODO: move this to delegateView
|
#TODO: move this to delegateView
|
||||||
|
|
||||||
$tpl = $this->scope["_template"] ?? "$presenterName/$action.xml";
|
$tpl = $this->scope["_template"] ?? "$presenterName/$action.xml";
|
||||||
if($tpl[0] !== "/")
|
if($tpl[0] !== "/") {
|
||||||
$tpl = CHANDLER_EXTENSIONS_ENABLED . "/$namespace/Web/Presenters/templates/$tpl";
|
$dir = CHANDLER_EXTENSIONS_ENABLED . "/$namespace/Web/Presenters/templates";
|
||||||
|
$tpl = "$dir/$tpl";
|
||||||
|
if(isset($this->scope["_templatePath"]))
|
||||||
|
$tpl = str_replace($dir, $this->scope["_templatePath"], $tpl);
|
||||||
|
}
|
||||||
|
|
||||||
$output = $this->delegateView($tpl, $presenter);
|
$output = $this->delegateView($tpl, $presenter);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue