id; $news_query = \app\models\front\News::find()->leftJoin('story_relation t', 't.news_id = id')->andWhere(['t.topic_id'=>$topic_id])->limit(30); $newsDataProvider = new \yii\data\ActiveDataProvider( [ "query"=>$news_query, "pagination" => false ] ); $story = $newsDataProvider->getModels(); $buf = ''; foreach( $story as $a ){ $buf .= "{ img: '/images/news/news/".$a['id']."_size2.jpg',"; $buf .= " html: '
".trim(str_replace("'",'"',stripslashes($a['title'])))."".trim(str_replace("'",'"',stripslashes($a['lid'])))."
'},"; } // to do resize 1200 for longrid ?>
Читайте также в сюжете: title;?>