public function actionDetail($id) { Content::updateAllCounters(['view_count'=>1],['id'=>$id]); $locals = $this->getDetail($id); return $this->render('detail_default', $locals); }
public function actionDetail($id) { Content::updateAllCounters(['view_count' => 1], ['id' => $id]); $locals = $this->getDetail($id); $locals['taxonomyModel'] = $this->taxonomyService->getTaxonomyById($locals['model']['taxonomy_id']); $vars = $this->getDetailVars($locals['taxonomyModel'], $locals['model']); $this->layout = $vars['layout']; return $this->render($vars['view'], $locals); }
public function actionIndex($id) { Content::updateAllCounters(['views' => 1], ['id' => $id]); $model = Content::findOne(['id' => $id]); return $this->render('index', ['model' => $model]); }