pagination_links function

I just updated to Omeka 2.0.3 and now my pagination links are all screwy.

I see the documentation for pagination_links() but it doesn't sufficiently explain why I now have a semi-functional input field instead of a conventional pagination list.

How can I restore the default behavior from earlier Omeka versions? eg:

First | Previous | 5 | 6 | 7 | Next | Last

Yes, we do have to update that documentation with an example!

Is this in one of the themes shipped with Omeka, or one that you are working on? It might be that there are changes to the classes on HTML elements. Is there a link we can take a look at?

Here's the function in items/browse.php:

<div id="pagination-top" class="pagination"><?php echo pagination_links(); ?></div>

... and output, which is you'll notice is not valid...

<div id="pagination-top" class="pagination">
	<ul class="pagination">

	<li class="page-input">
	<form action="/items/browse" method="get" accept-charset="utf-8">
		<input type="text" name="page" id="page" value="1"> of 2    </li>
	</form>

	<!-- Next page link -->
	<li class="pagination_next">
		<a href="/items/browse?page=2">></a>
	</li>
</ul>

</div>

This effects all themes I'm working on. 3 or 4 or them, all custom. It also impacts all of the shipping themes that I have handy (some of which may be released with 2.0.2 or older).

2.0.3 moved to make the pagination consistent on the admin and public sides. The admin side has been using this style of pagination control since the first 2.0 release.

The flipping of </li> and </form> in the output is definitely a bug, but one that shouldn't actually affect anything (though of course we'll fix it). What do you mean by "semi-functional?"

The up-to-date versions of all the bundled themes (Thanks, Roy, Seasons, and Berlin) include CSS support for both the 2.0.2 and 2.0.3 pagination styles.

That being said, you can still have your theme use the "old" pagination if you want (or any other style). The file common/pagination_control.php in a theme is what's responsible for the actual output of the pagination_links function. You can include the old 2.0.2 pagination in your theme if you want to force usage of the old pagination.

I've added pagination_control.php to my theme.

I was mistaken when I called the new default "semi-functional." My old CSS made the total number of pages invisible (white text on white for "1 of 10" text), so it seemed to be lacking key information. Sorry about that.

Thanks for your help.

We'll see what we can do about providing some basic example styles for the new pagination too. We think it's an improvement over the old one: you can easily jump to any page, and it's easier to fit into smaller mobile layouts.