Index: core/units/helpers/category_helper.php IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- core/units/helpers/category_helper.php (revision 15775) +++ core/units/helpers/category_helper.php (revision ) @@ -150,14 +150,19 @@ } $base_category = $this->Application->getBaseCategory(); // "Content" category + + if ( isset($items_by_parent[$base_category]) ) { - $index_category = $this->findIndexCategoryId($items_by_parent[$base_category]); + $index_category = $this->findIndexCategoryId($items_by_parent[$base_category]); - // rename "Content" into "Home" keeping it's ID - $items_by_parent[$parent_mapping[$base_category]][$base_category]['l1_Name'] = $this->Application->Phrase('la_rootcategory_name'); + // rename "Content" into "Home" keeping it's ID + $items_by_parent[$parent_mapping[$base_category]][$base_category]['l1_Name'] = $this->Application->Phrase('la_rootcategory_name'); + if ( $index_category !== false ) { - // remove category of "index.tpl" template - unset($items_by_parent[$base_category][$index_category]); - unset($parent_mapping[$index_category]); + // remove category of "index.tpl" template + unset($items_by_parent[$base_category][$index_category]); + unset($parent_mapping[$index_category]); + } + } } $data = $items_by_parent[$parent_mapping[$parent_category_id]][$parent_category_id]; @@ -350,7 +355,7 @@ $templates = $this->Conn->GetCol($sql, 'CategoryId'); $base_category = $this->Application->getBaseCategory(); - + if ( isset($templates[$base_category]) ) { // "Content" category will act as "Home Page" $templates[$base_category] .= '/Index'; \ No newline at end of file