yii-starter-kit / yii2-starter-kit

Yii2 Starter Kit
http://yii2-starter-kit.terentev.net
Other
1.42k stars 648 forks source link

disable pjax for a view user link #640

Closed dungmediabridge closed 5 years ago

dungmediabridge commented 5 years ago

image

XzAeRo commented 5 years ago

You should add the data-pjax = "0" property in the Html button. This is described in the Pjax documentation (in the description at the top): https://www.yiiframework.com/doc/api/2.0/yii-widgets-pjax

In the case of the Timeline, it would be something like:

<?php echo \yii\helpers\Html::a(
    Yii::t('backend', 'View user'),
    ['/user/view', 'id' => isset($model->data['user_id']) ? $model->data['user_id'] : $model->data['userId']],
    ['class' => 'btn btn-primary btn-flat btn-xs', 'data-pjax' => 0],
) ?>