bernhard Posted July 21, 2016 Share Posted July 21, 2016 i really like uikit framework and it has a nice looking pagination component: http://getuikit.com/docs/pagination.html creating the pager markup is a little bit tricky and i've only managed it with a little jquery hack. the problem is that the "active" item needs a <span> without an <a> and that's not possible with the built in renderPager() to save anybody needing uikit pager some time, here are the options: <?php echo $items->renderPager(array( 'numPageLinks' => 5, 'listMarkup' => "<ul class='uk-pagination'>{out}</ul>", 'itemMarkup' => "<li class='{class}'>{out}</li>", 'linkMarkup' => "<a href='{url}'>{out}</a>", 'nextItemLabel' => '<i class="uk-icon-angle-double-right"></i>', 'previousItemLabel' => '<i class="uk-icon-angle-double-left"></i>', 'separatorItemLabel' => '<span>...</span>', 'currentItemClass' => 'uk-active', )); and then you need this line of jquery to remove the <a> from the active item: $('li.uk-active > a > span').unwrap(); or do you guys have any better solutions for this? happy paginating 1 Link to comment Share on other sites More sharing options...
fbg13 Posted July 22, 2016 Share Posted July 22, 2016 Why not take the uikit style from the <span> and add it to the <a>? .uk-pagination>.uk-active>a { background: #009dd8; color: #fff; border: 1px solid rgba(0,0,0,.2); border-bottom-color: rgba(0,0,0,.4); background-origin: border-box; background-image: -webkit-linear-gradient(top,#00b4f5,#008dc5); background-image: linear-gradient(to bottom,#00b4f5,#008dc5); text-shadow: 0 -1px 0 rgba(0,0,0,.2); } 1 Link to comment Share on other sites More sharing options...
Recommended Posts