Martinus Posted September 28, 2022 Share Posted September 28, 2022 Hi, I am using Bootstrap 5.2 and so I was implementing the pagination using the 'pagerNav' I have found several names ... My code is as follows: <nav> <?php // pagination and styling echo $items->renderPager(array( 'nextItemLabel' => "Next", 'previousItemLabel' => "Prev", 'listMarkup' => "<ul class='pagination'>{out}</ul>", 'itemMarkup' => "<li class='page-item'>{out}</li>", 'linkMarkup' => "<a class='page-link' href='{url}'><span>{out}</span></a>", 'currentItemClass' => "active", )); ?> </nav> All is working, except the 'currentItemClass'. I am not able to style it although using the samples of bootstrap it all works fine. Am I doing something wrong??? Link to comment Share on other sites More sharing options...
Martinus Posted September 28, 2022 Author Share Posted September 28, 2022 Never mind, I have change it to this code and now it works: <?php echo $items->renderPager([ 'page' => wire('page'), 'nextItemLabel' => "Next", 'previousItemLabel' => "Prev", 'listMarkup' => '<nav aria-label="navigation"><ul class="pagination">{out}</ul></nav>', 'itemMarkup' => '<li class="page-item {class}">{out}</li>', 'linkMarkup' => '<a class="page-link" href="{url}">{out}</a>', 'currentLinkMarkup' => '<a class="page-link" href="{url}">{out}</a>', 'currentItemClass' => "active" ]); ?> I think it was the 'currentLinkMarkup' that was actually missing ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now