public function BuildTemplate($a_template)
 {
     // Load template
     $doc = new Template_Document($a_template);
     // Load all static modules
     $modules = $doc->getElementsByTag('CMS_MODULE');
     foreach ($modules as $module) {
         // Build Module
         $c_module = new StaticModule($module, $this->m_pageid);
         $module_doc = $c_module->Build();
         $module->replaceWith($module_doc);
     }
     // Load all modules
     $containers = $doc->getElementsByTag('CMS_CONTAINER');
     foreach ($containers as $container) {
         $c_container = new Container($container, $this->m_pageid);
         $c_container->Build();
     }
     // Plugin Hook
     $data_object = new stdClass();
     $data_object->pageid = $this->m_pageid;
     $data_object->doc = $doc;
     ObjMgr::GetPluginMgr()->ExecuteHook("On_Compiler_BuiltTemplate", $data_object);
     return $doc;
 }