diff options
author | Julius Härtl <jus@bitgrid.net> | 2018-01-25 19:14:27 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-02-27 12:25:52 +0100 |
commit | 0655df09d6cfcec1084680a6ef9082422a1ca578 (patch) | |
tree | e1853b6cb1aa603e3db9b90f3166ccfc99234207 /lib/private/legacy | |
parent | d0a6368a8bc9b03cba66c4a485aa001da187b2e3 (diff) | |
download | nextcloud-server-0655df09d6cfcec1084680a6ef9082422a1ca578.tar.gz nextcloud-server-0655df09d6cfcec1084680a6ef9082422a1ca578.zip |
Pass template parameters to parent template
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/legacy')
-rw-r--r-- | lib/private/legacy/template.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/private/legacy/template.php b/lib/private/legacy/template.php index c5279bff6b8..a362b581fe2 100644 --- a/lib/private/legacy/template.php +++ b/lib/private/legacy/template.php @@ -206,6 +206,12 @@ class OC_Template extends \OC\Template\Base { if( $this->renderAs ) { $page = new TemplateLayout($this->renderAs, $this->app); + if(is_array($additionalParams)) { + foreach ($additionalParams as $key => $value) { + $page->assign($key, $value); + } + } + // Add custom headers $headers = ''; foreach(OC_Util::$headers as $header) { @@ -226,7 +232,7 @@ class OC_Template extends \OC\Template\Base { $page->assign('headers', $headers); $page->assign('content', $data); - return $page->fetchPage(); + return $page->fetchPage($additionalParams); } return $data; |