public function actionView($url = '/')
    {
        /**
         * @var Item $model
         */
        if (!$model = Item::getCurrentPage($url)) {
            throw new \yii\web\HttpException(404, \Yii::t('modules/page', "Page not found"));
        }

        if ($model->layout) {
            $this->layout = $model->layout;
        }

        return $this->render('view', compact('model'));
    }
public function actionView($url = '/')
    {
        /**
         * @var Item $model
         */
        if (!$model = Item::getCurrentPage($url)) {
            throw new \yii\web\HttpException(404, \Yii::t('modules/page', "Page not found"));
        }

        if ($model->layout) {
            $this->layout = $model->layout;
        }

        return $this->render('view', compact('model'));
    }
public function actionView ( $ url = '/' ) { /**
         * @var Item $model
         */ if ( ! $ model = Item :: getCurrentPage ( $ url ) ) { throw new \ yii \ web \ HttpException ( 404 , \ Yii :: t ( 'modules/page' , "Page not found" ) ) ; } if ( $ model -> layout ) { $ this -> layout = $ model -> layout ; } return $ this -> render ( 'view' , compact ( 'model' ) ) ; }
Renders common page view.
@param string $url relative url from route.
@return string
@throws \yii\web\HttpException
Renders common page view .