summaryrefslogtreecommitdiff
path: root/framework/Web/Services/TPageService.php
diff options
context:
space:
mode:
authorxue <>2006-01-29 09:14:14 +0000
committerxue <>2006-01-29 09:14:14 +0000
commit976e3aa06ebe82fe6d1c7317c827425111be5df6 (patch)
tree7ca22e6681cd1203a70acb4710c1ee3cfa2bc337 /framework/Web/Services/TPageService.php
parent80c39c977568b5b84f5ea2b93f8c1e8d799d558a (diff)
Added support to template tag.
Diffstat (limited to 'framework/Web/Services/TPageService.php')
-rw-r--r--framework/Web/Services/TPageService.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/framework/Web/Services/TPageService.php b/framework/Web/Services/TPageService.php
index 0d8f28b9..239cf870 100644
--- a/framework/Web/Services/TPageService.php
+++ b/framework/Web/Services/TPageService.php
@@ -442,10 +442,15 @@ class TPageService extends TService
}
else
$className='TPage';
- //allow the page constructor to change application settings before template is loaded
+
$this->_page=new $className();
- $this->_properties['Template']=$this->getTemplateManager()->getTemplateByFileName($path.self::PAGE_FILE_EXT);
- $this->_page->initializeProperties($this->_properties);
+
+ // initialize page properties with those set in configurations
+ foreach($this->_properties as $name=>$value)
+ $this->_page->setSubProperty($name,$value);
+
+ // set page template
+ $this->_page->setTemplate($this->getTemplateManager()->getTemplateByFileName($path.self::PAGE_FILE_EXT));
}
else
throw new THttpException(404,'pageservice_page_unknown',$this->_pagePath);