Jump to content

Pagination not adding current class to markup


Neo
 Share

Recommended Posts

Following  the news-system tutorial (https://processwire.com/talk/topic/2985-how-to-create-a-simple-news-system-for-pw/), I am currently implementing the pagination for the list view, which uses the "Pager"-module (https://processwire.com/api/modules/markup-pager-nav/).

The pagination works, however I am unable to add a custom class to the current, active page.

The class simply does not show up in the markup.

Here is my code:

// Pagination
$out .="<nav class='pagination'>";
$out .= $newsposts->renderPager(array(
 
	'nextItemLabel' => "Next",
	'previousItemLabel' => "Prev",
	'currentItemClass' => "current", 
	'listMarkup' => "<ul>{out}</ul>",
	'itemMarkup' => "<li>{out}</li>",
	'linkMarkup' => "<a href='{url}'>{out}</a>",  
));
$out .="<div class='clearfix'></div>";
$out .="</nav>";

Would appreciate you advice. 

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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