/** * List service * * @param integer $id * * @throws CHttpException */ public function actionService($id) { $model = $this->loadServiceModel($id); $this->breadcrumbs = CatalogCategory::getBreadcrumbs($model->id_category, true); $this->breadcrumbs[] = $model->short_title; $this->metaInfoGenerate($model->short_title, $model->keywords, $this->catalog_config->description); $this->render('service', array('category' => $model)); }
public function actionProduct($id) { $model = $this->loadProductModelFast($id); if (!$model->hide) { // Увеличиваем количество просмотров на 1 $model->incViews(); $this->breadcrumbs = CatalogCategory::getBreadcrumbs($model->id_category, true); $this->breadcrumbs[] = $model->title; // формируем заголовок и метатеги старницы $this->metaInfoGenerate($model->title, $model->keywords, $this->catalog_config->description); $this->render('product', array('model' => $model)); } else { throw new CHttpException(404, 'The requested page does not exist.'); } }