0)?$items:50; if( isset($topic) && $topic ){ $news_query = \app\models\front\News::find()->leftJoin('news_topic_relation t', 't.news_id = id')->andWhere(['t.topic_id'=>$topic]); $newsDataProvider = new ActiveDataProvider([ "query"=>$news_query, 'sort'=> [ 'defaultOrder' => ['dt_pub' => SORT_DESC], ], "pagination" =>[ "pageSize"=>$items ], ]); ?> Лента новостей