public function actionIndex()
 {
     if (isset(yii::$app->request->isAjax)) {
         $page_id = yii::$app->request->get('page_id');
         $comments = new comments();
         $commentsItems = $comments->GetComments($page_id);
         $data['items'] = $commentsItems['items'];
         $data['pagination'] = $commentsItems['pagination'];
         return $this->renderAjax('index', $data);
     }
 }
 public function actionDetail()
 {
     $model = $this->GetModel();
     $properties = new Properties();
     $options = new Options();
     $comments = new comments();
     $this->blog = $model::findOne($this->item->parent_id);
     $this->name = $options->GetOptions('name');
     $data['options'] = $options;
     $data['properties'] = $properties;
     $data['comments'] = $comments;
     $data['value'] = $this->item;
     $commentsItems = $comments->GetComments($this->item->id);
     $data['commentsItems'] = $commentsItems['items'];
     $data['commentsPager'] = $commentsItems['pagination'];
     return $this->render('detail', $data);
 }