3133 - Отключение sitemap.xml страниц на анг.

parent a9f97dc6
...@@ -75,9 +75,9 @@ class SiteController extends FrontendController ...@@ -75,9 +75,9 @@ class SiteController extends FrontendController
public function actions() public function actions()
{ {
return [ return [
/*'error' => [ 'error' => [
'class' => 'yii\web\ErrorAction', 'class' => 'yii\web\ErrorAction',
],*/ ],
'captcha' => [ 'captcha' => [
'class' => 'yii\captcha\CaptchaAction', 'class' => 'yii\captcha\CaptchaAction',
'fixedVerifyCode' => YII_ENV_TEST ? 'testme' : null, 'fixedVerifyCode' => YII_ENV_TEST ? 'testme' : null,
...@@ -85,20 +85,20 @@ class SiteController extends FrontendController ...@@ -85,20 +85,20 @@ class SiteController extends FrontendController
]; ];
} }
public function actionError() // public function actionError()
{ // {
$model = \common\modules\content\models\CoContent::findOne(['url' => 'site/error']); // $model = \common\modules\content\models\CoContent::findOne(['url' => 'site/error']);
//
if(!($lang = $model->lang) || $lang->hidden) { // if(!($lang = $model->lang) || $lang->hidden) {
throw new NotFoundHttpException('Page not found!'); // throw new NotFoundHttpException('Page not found!');
} // }
$content = $lang->getFinishedContent(); // $content = $lang->getFinishedContent();
$this->meta_title = $model->metaTag->title; // $this->meta_title = $model->metaTag->title;
$this->meta_description = $model->metaTag->description; // $this->meta_description = $model->metaTag->description;
$this->meta_keywords = $model->metaTag->keywords; // $this->meta_keywords = $model->metaTag->keywords;
Yii::$app->response->setStatusCode(404); // Yii::$app->response->setStatusCode(404);
return $this->render('error', ['content'=>$content]); // return $this->render('error', ['content'=>$content]);
} // }
public function actionIndex() public function actionIndex()
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment