summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework/Web/UI/TTemplate.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/framework/Web/UI/TTemplate.php b/framework/Web/UI/TTemplate.php
index c441d7c1..0e36f2f4 100644
--- a/framework/Web/UI/TTemplate.php
+++ b/framework/Web/UI/TTemplate.php
@@ -93,7 +93,18 @@ class TTemplate extends TComponent implements ITemplate
if(isset($object[2])) // component
{
if(strpos($object[1],'.')===false)
- $component=new $object[1];
+ {
+ if(class_exists($object[1],false))
+ $component=new $object[1];
+ else
+ {
+ include_once($object[1].Prado::CLASS_FILE_EXT);
+ if(class_exists($object[1],false))
+ $component=new $object[1];
+ else
+ throw new TTemplateRuntimeException('template_component_unknown',$object[1]);
+ }
+ }
else
$component=Prado::createComponent($object[1]);
if($component instanceof TControl)