diff options
Diffstat (limited to 'framework/Web/UI/TTemplateManager.php')
-rw-r--r-- | framework/Web/UI/TTemplateManager.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/framework/Web/UI/TTemplateManager.php b/framework/Web/UI/TTemplateManager.php index bd838db2..d039288e 100644 --- a/framework/Web/UI/TTemplateManager.php +++ b/framework/Web/UI/TTemplateManager.php @@ -233,8 +233,9 @@ class TTemplate extends TComponent implements ITemplate */
public function instantiateIn($tplControl)
{
- $page=$tplControl->getPage();
- $this->_assetManager=$page->getService()->getAssetManager();
+ if(($page=$tplControl->getPage())===null)
+ $page=$this->getService()->getRequestedPage();
+ $this->_assetManager=$this->getService()->getAssetManager();
$controls=array();
foreach($this->_tpl as $key=>$object)
{
|