cache->getOrSet("archive_rubrics-amp0",function () { return \yii\widgets\ListView::widget([ "dataProvider" => new \yii\data\ActiveDataProvider([ "query"=>NewsTopic::find()->andWhere(["show"=>"Y","active"=>1,"topic_id"=>null])->orderBy(["order"=>SORT_ASC]), //"topic_id"=>$topic->id next lavel maybe "pagination" =>[ "pageSize"=>0 ], ]), 'options' => [ 'tag' => "ul", 'class' => 'list-reset m0 p0 ampstart-label', 'id' => 'list-wrapper', ], "itemOptions"=>[ "tag"=>"li", "class"=>"ampstart-nav-item" ], "itemView" => function($model) { if( $model->url == '----'){ $ret = \yii\helpers\Html::tag('div','',['class' => ['hr']]); //$ret .= \yii\helpers\Html::tag('span',$model->title,['class' => ['header']]); return $ret; } return \yii\helpers\Html::a($model->title,["news/{$model->url}"]); }, "layout" => "{items}" ]); },1);//NewsTopic::$keysCache['archive_rubrics-##']