registerJsFile( '@web/js/autocomplete/jquery.autocomplete.min.js', ['position'=>View::POS_END, 'defer' => 'defer'], 'autocomplete' ); $this->params['breadcrumbs'] = [ [ "text"=>"НОВОСТИ", "url"=>"/news" ] ]; if($topic instanceof NewsTopic){ $this->params['breadcrumbs'][] = [ "text"=>$topic->title, "url"=>$topic->url ]; } $dateRange = \Yii::$app->request->get('daterange'); $ssearch = \Yii::$app->request->get('q'); $tag = \Yii::$app->request->get('tag',null); $story = \Yii::$app->request->get('story',null); if( !is_null($story) ){ $storys = Story::findOne(['id'=>$story]); } if( !is_null($tag) ){ $tags = Tags::findOne(['id'=>$tag]); } $sstring = !isset($tags)?'':'по тэгу:'.$tags->title; $sstring .= !isset($storys)?'':' по сюжету:'.$storys->title; $sstring .= ' '.$ssearch; if(!is_null($dateRange) && $dateRange!=""){ $dateRange = explode(" — ",$dateRange); $dtb = date("Y-m-d",strtotime($dateRange[0])); $dte = isset($dateRange[1])?date("Y-m-d",strtotime($dateRange[1])):date("Y-m-d",strtotime($dateRange[0])); } $page = \Yii::$app->request->get('page'); $addtpage = $page?". Страница ($page)":''; Yii::$app->og->title = "Страница поиска".$addtpage.' - '.$sstring; Yii::$app->og->description = "Поиск статей по сайту amic.ru".$addtpage.' - '.$sstring; Yii::$app->og->noindex = 'Y'; ?>