gtoirog Posted July 2, 2013 Share Posted July 2, 2013 Hi, I've implemented Pagination and outputting it using renderPager. And I wonder how I can make the current page link not a link, just normal text. Thanks. Link to comment Share on other sites More sharing options...
3fingers Posted July 2, 2013 Share Posted July 2, 2013 Hi gtoirog, from this page ( http://processwire.com/api/modules/markup-pager-nav/ ) you can see all the custom options connected to the Pagination in PW. The one you are looking for is "currentItemClass" that determines the css class for the current/active/on button list item. From the documentation : <?php echo $results->renderPager(array( 'currrentItemClass' => "active" // "active" is just the class name I choose. )); From there, in your css you could style it however you want. Since css, by now, hasn't a common solution to disable a link yet, you should disable it via Jquery. Something like this might work as expected : $('.active').attr('disabled', true); Give it a try 1 Link to comment Share on other sites More sharing options...
diogo Posted July 2, 2013 Share Posted July 2, 2013 You don't even have to do the first step that 3fingers referred. Knowing that the default class is "MarkupPagerNavOn" you could simply: $('.MarkupPagerNavOn').attr('disabled', true); or even simply replace all the content of that element (the link) by only the number: $('.MarkupPagerNavOn').each(function(){ $this = $(this); $this.html($this.children('a').text()); }); 2 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