Jump to content

currentItemClass not working [SOLVED]


Recommended Posts


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:

  <?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",

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

Never mind, I have change it to this code and now it works:

        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

  • Martinus changed the title to currentItemClass not working [SOLVED]

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...