public function action_tags() { $widgets = array(); $tagName = urldecode($this->request->param('id')); $materials = new Model_Material('groups'); $materialList = $materials->getMidFromTags($tagName); if (!$materialList) { throw new HTTP_Exception_404(); } //Описание ингридиента $tagUrl = $materials->str2url($tagName); $ingridientId = $materials->getMaterialIdByUrl($tagUrl); if ($ingridientId) { $widgets[] = Request::factory('widgets/material/index/' . $ingridientId)->execute(); } $this->styles = array('/css/search.css'); $old_styles = $this->template->styles; array_unique($this->styles); $new_styles = array_merge($this->styles, $old_styles); $this->template->styles = $new_styles; $this->template->title = $tagName . ''; $this->template->page_title = $tagName; $this->template->keywords = $tagName . '' . $tagName; $this->template->description = '' . $tagName; $materialsString = implode('/', $materialList); View::set_global('categoryName', ''); $widgets[] = Request::factory('widgets/catalog/index/' . $materialsString . '/tags')->execute(); $this->template->styles[] = 'css/catalog.css'; $this->template->block_center = $widgets; }