예제 #1
0
	public function actionDetail($id)
	{
	    Content::updateAllCounters(['view_count'=>1],['id'=>$id]);
	     
	    $locals = $this->getDetail($id);
	
	    return $this->render('detail_default', $locals);
	}
예제 #2
0
 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);
 }
예제 #3
0
 public function actionIndex($id)
 {
     Content::updateAllCounters(['views' => 1], ['id' => $id]);
     $model = Content::findOne(['id' => $id]);
     return $this->render('index', ['model' => $model]);
 }