2016-04-07 13 views
3

Ön ve sonraki tuşlar için Yii2 sayfalandırmalarında bootstrap glyphicon simgelerini kullanmak istiyorum. CSS sınıflarını feryat koduna koymuştum ama işe yaramadı. Simgeyi gösterir, ancak doğru yerde ve bir bağlantı olmadan gösterir.Önceki ve sonraki düğmeler için yii2 sayfa numaralandırmada bootstrap glyphicon simgeleri nasıl kullanılır?

'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

deneyin ' 'prevPageLabel' => '' , –

+0

Tanx adam çalıştı;)) –

cevap

3

Sen <span> kullanarak simgeleri ekleyebilirsiniz: Örneğin

,

'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 
], 
İlgili konular