hi there
how can I use font-awesome icons in clinkpager buttons?
im using this but it shows the font-awesome’s classes name:
<?php $this->widget('CLinkPager', array(
'pages' => $pages,
'htmlOptions' => ['class' => ''],
'nextPageCssClass' => 'next',
'selectedPageCssClass' => 'active',
'firstPageLabel' => 'fa fa-chevron-right'
)); ?>
inradius
(Stroud Travis)
February 25, 2015, 3:35pm
2
You have the label set to the css class, so that’s why it shows the class name. Try setting the firstPageCssClass to fa fa-chevron-right and see if that works.
ronald58
(Yii)
February 25, 2015, 3:39pm
3
Just a blind guess:
<?php $this->widget('CLinkPager', array(
'pages' => $pages,
'previousPageCssClass' => 'fa fa-chevron-left',
'nextPageCssClass' => 'fa fa-chevron-right',
'prevPageLabel' => ' ',
'nextPageLabel' => ' ',
)); ?>
inradius
(Stroud Travis)
February 25, 2015, 3:44pm
4
Actually, I just tested it out and this worked for me. Set the firstPageLabel like so…
'firstPageLabel' => CHtml::tag('i', array('class' => 'fa fa-chevron-right')),