Answer the question
In order to leave comments, you need to log in
How to add fields to GridView?
there is such a code
if(is_array($color)){$colorDatas=ArrayHelper::map($color,'id','value');}
[
'filter' =>Select2::widget ([
'model' => $searchModel,
'attribute' => 'color',
'data' => $colorDatas,
'language' => 'ru',
'options' => ['multiple' => true,'placeholder' => Yii::t('backend','SELECT_SHOP')],
'pluginOptions' => [
'allowClear' => true
],
]),
'attribute' => 'color',
'value' => function($model){
return $model->theGetValue($model);
}
],
Answer the question
In order to leave comments, you need to log in
Server:
# 301 редирект со страниц со слешем на страницы без слеша в конце URL
rewrite ^/(.*)/$ /$1 permanent;
This is the construction that works in htacess for Latin URLs. It did not work with Cyrillic (( Like the answer above, it also did not work with Cyrillic in the URL
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^(.+)/$
RewriteRule ^(.+)/$ /$1 [R =301,L]
to display a widget in a column, you can use the content property of the column class
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question