Index: trunk/core/kernel/utility/http_query.php =================================================================== diff -u -N -r4138 -r4149 --- trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 4138) +++ trunk/core/kernel/utility/http_query.php (.../http_query.php) (revision 4149) @@ -361,6 +361,7 @@ $this->Application->VerifyThemeId(); // verify anyway - will set default if not found!!! // match category + $category_id = 0; if($url_part) { $category_stack = Array(); @@ -418,7 +419,7 @@ $url_part = 'index'; } } - elseif ($url_part && count($url_parts) == 0) { + elseif ($url_part && count($url_parts) == 0 && $category_id) { // only filename left, no other parts $sql = 'SELECT ParentPath, CachedItemTemplate FROM '.TABLE_PREFIX.'Category @@ -428,11 +429,17 @@ $root_category_id = array_shift( explode('|', substr($category_data['ParentPath'], 1, -1)) ); $module_info = $this->Application->findModule('RootCat', $root_category_id); if ($module_info) { - $item_template = $category_data['CachedItemTemplate']; - if ($item_template) { - $url_parts = explode('/', $item_template); - array_push($url_parts, $url_part); // save item's filename as not processed - $url_part = array_shift($url_parts); + $module_prefix = $module_info['Var']; + $module_event = new kEvent($module_prefix.':ParseEnv', Array('url_parts' => Array($url_part)) ); + $this->Application->HandleEvent($module_event); + + if ($module_event->status == erSUCCESS) { + $item_template = $category_data['CachedItemTemplate']; + if ($item_template) { + $url_parts = explode('/', $item_template); + array_push($url_parts, $url_part); // save item's filename as not processed + $url_part = array_shift($url_parts); + } } } }