Example #1
0
 /**
  * Show page contents
  * @param string $alias 
  * @return void
  */
 public function actionIndex($alias)
 {
     $model = Page::findByAlias($alias);
     if ($model === null || !$model->active) {
         throw new NotFoundHttpException(Yii::t('yii', 'Page not found.'));
     }
     return $this->render('index', ['model' => $model]);
 }