2016-04-07 1 views
3

Ich möchte bootstrap glyphicon icons in Yii2 Seitenumbruch für prev und nächste Schaltfläche verwenden. Ich habe ihre CSS-Klasse im unteren Code festgelegt, aber es hat nicht funktioniert. Es zeigt das Symbol, aber nicht an der richtigen Stelle und ohne einen Link zu ihm.Wie man Bootstrap Glyphicon Icons in yii2 Paginierung für Prev und Next Button verwendet?

'pager' => [ 
     'options'   => ['class'=>'pagination'], // set clas name used in ui list of pagination 
     'prevPageLabel' => '>', // Set the label for the "previous" page button 
     'nextPageLabel' => '<', // Set the label for the "next" page button 
     'firstPageLabel' => '>>', // Set the label for the "first" page button 
     'lastPageLabel' => '<<', // Set the label for the "last" page button 
     'nextPageCssClass' => 'next', // Set CSS class for the "next" page button 
     'prevPageCssClass' => 'perv', // Set CSS class for the "previous" page button 
     'firstPageCssClass'=> 'first', // Set CSS class for the "first" page button 
     'lastPageCssClass' => 'last', // Set CSS class for the "last" page button 
     'maxButtonCount' => 10, // Set maximum number of page buttons that can be displayed 
    ], 
+0

Try ' 'prevPageLabel' => '' , ' –

+0

Tanx Mann hat es funktioniert,;) –

Antwort

3

Sie können Symbole hinzufügen <span> mit:

Zum Beispiel

'pager' => [ 
    'options'   => ['class'=>'pagination'], // set clas name used in ui list of pagination 
    'prevPageLabel' => '<span class="glyphicon glyphicon-chevron-left"></span>', 
    'nextPageLabel' => '<span class="glyphicon glyphicon-chevron-right"></span>', 
    'firstPageLabel' => '<span class="glyphicon glyphicon-fast-backward"></span>', 
    'lastPageLabel' => '<span class="glyphicon glyphicon-fast-forward"></span>', 
    'nextPageCssClass' => 'next', // Set CSS class for the "next" page button 
    'prevPageCssClass' => 'prev', // Set CSS class for the "previous" page button 
    'firstPageCssClass'=> 'first', // Set CSS class for the "first" page button 
    'lastPageCssClass' => 'last', // Set CSS class for the "last" page button 
    'maxButtonCount' => 10, // Set maximum number of page buttons that can be displayed 
],