161 else $category = $this->getModel()->fetch();
162 }
163 else $category = $parent;
164
165 if ($state->isUnique() && $category->isNew()) {
166 throw new KControllerExceptionResourceNotFound('Category not found');
167 }
168
169 //Subcategories
170 if ($params->show_subcategories)
171 {