A
A
Anna S.2021-06-29 11:02:45
Yii
Anna S., 2021-06-29 11:02:45

How to add custom button to pagination in Yii2 GridView widget?

Good afternoon!
The task is to add a button with separate functionality to it when displaying pagination through the data provider and the GridView widget.
The button code is:

<h2 class="add-folder" style="padding-left: 15px;"><?= Html::a(GlyphIcon::i('briefcase') . ' ' . Html::tag('span', Yii::t('script', 'Add folder'), ['class' => 'hidden-xs hidden-sm']) . Html::tag('span', Yii::t('script', 'Add folder'), ['class' => 'visible-xs-inline-block visible-sm-inline-block']), '#', ['data-toggle' => 'modal', 'data-target' => '#add_folder_modal', 'class' => 'btn btn-primary btn-custom btn-lg qtip-buttons', 'data-my' => 'top left', 'data-at' => 'bottom right', 'title' => Yii::t('script', 'Add folder')]) ?></h2>

Now I have brought it out under pagination, I can’t find anywhere how to add it inside.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question