275276277278279280281282283284285286287288289290291292293 $slug = NULL;
}
// Each single article
if (!empty($slug)) {
$news = Blog::find()->where(['slug' => $slug])->one();
if(empty($news->status) || $news->status == Blog::NOT_ACTIVE_STATUS){
//return $this->redirect('/news.html');
throw new HttpException(404 ,'News not found');
}
$content = Page::find()->with('texts')->where(['id' => 8])->one();
// $parentCategoryUrl = 'https://'.$_SERVER['HTTP_HOST'].'/news.html'; // sgori
$parentCategoryUrl = 'https://'.$_SERVER['HTTP_HOST'].'/news';
$breadcrumbsInfo['parentCategoryName'] = 'Статьи';
$breadcrumbsInfo['parentCategoryUrl'] = $parentCategoryUrl;
return $this->render('page', [