Index: trunk/core/kernel/utility/http_query.php =================================================================== diff -u -r3220 -r3229 --- trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 3220) +++ trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 3229) @@ -438,6 +438,27 @@ }while (!$template_found && $template_parts); } + + // guess template if no existing template found + if(!$template_found && $module_folder) + { + // 1. try index template of module + $sql = 'SELECT FileId FROM '.TABLE_PREFIX.'ThemeFiles WHERE CONCAT(FilePath, "/", FileName) = '.$this->Conn->qstr('/'.$module_folder.'/index.tpl'); + $template_found = $this->Conn->GetOne($sql); + if($template_found) + { + $template_path = $module_folder.'/index'; + } + else + { + // 2. return error template then + $template_found = true; + $template_path = $this->Application->ConfigValue('ErrorTemplate'); + if(!$template_path) $template_path = 'error_template'; + } + } + + $this->Set('t', $this->getDefaultTemplate($template_found ? $template_path : '') ); // pass params left to module