public function action_catalog() { $materials = new Model_Material('groups'); //получаем url материала $materialID = $this->request->param('id'); $material = $materials->getMaterial($materialID); $fields = $materials->getFields2($materialID, TRUE); $this->template->title = $material['name']; $this->template->page_title = $material['name']; $this->template->keywords = $material['keywords']; $this->template->description = $material['description']; $this->template->links = array('<link rel="canonical" href="' . Kohana::$base_url . 'catalog/' . $materialID . '.html"/>'); $this->template->styles = Resources::load_styles(); if (!$material['id']) { throw new HTTP_Exception_404(); } //обновляем просмотры $materials->updateViews($material['id']); $widgets[] = Request::factory('widgets/material/index/' . $materialID)->execute(); $this->template->block_center = $widgets; }