mirror of
https://github.com/openvk/chandler.git
synced 2025-02-23 20:19:43 +03:00
Simplify template overrides
This commit is contained in:
parent
a944b7da25
commit
52c05f2301
1 changed files with 7 additions and 5 deletions
|
@ -130,10 +130,12 @@ class Router
|
||||||
|
|
||||||
$this->scope += array_merge_recursive($presenter->getTemplateScope(), []); #TODO: add default parameters
|
$this->scope += array_merge_recursive($presenter->getTemplateScope(), []); #TODO: add default parameters
|
||||||
#TODO: move this to delegateView
|
#TODO: move this to delegateView
|
||||||
$output = $this->delegateView(
|
|
||||||
$this->scope["_template"] ?? CHANDLER_EXTENSIONS_ENABLED . "/$namespace/Web/Presenters/templates/$presenterName/$action.xml",
|
$tpl = $this->scope["_template"] ?? "$presenterName/$action.xml";
|
||||||
$presenter
|
if($tpl[0] !== "/")
|
||||||
);
|
$tpl = CHANDLER_EXTENSIONS_ENABLED . "/$namespace/Web/Presenters/templates/$tpl";
|
||||||
|
|
||||||
|
$output = $this->delegateView($tpl, $presenter);
|
||||||
|
|
||||||
$presenter->onAfterRender();
|
$presenter->onAfterRender();
|
||||||
} catch(InterruptedException $ex) {}
|
} catch(InterruptedException $ex) {}
|
||||||
|
|
Loading…
Reference in a new issue