1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- use yii\helpers\Html;
- echo "<!-- 3 новости в ряд -->";
- if(!is_null($design->parent)){
- echo Html::tag('h2',Html::a($design->parent->title,[$design->parent->getUrl()]),['class'=>"widget-title mt-2 text-center"]);
- }
- echo Html::beginTag("div",["class"=>"partner-news row"]);
- echo Yii::$app->cache->getOrSet("main-page-third-row-l2-".$design->id,function () use ($newsDataProvider){
- return \yii\widgets\ListView::widget([
- "dataProvider" => $newsDataProvider,
- 'options' => [
- 'tag' => false,
- 'class' => 'list-wrapper',
- 'id' => 'list-wrapper',
- ],
- "itemOptions"=>[
- "tag"=>false
- ],
- "itemView" => "_partner_news_item",
- "layout" => "{items}"
- ]);
- },60);
- echo \yii\helpers\Html::endTag("div");
|