Cindy
posted this on September 23, 2011, 07:51
In regards to this article - http://support.webvanta.com/article/77213-displaying-paginated-data..., is there a way to set the page option so the items are paginated by date, rather than item numbers? For example, page 1 shows all items from 2010, pages 2 shows all items from 2009, etc.
Comments
No, we don't have such an option. The pagination system requires a fixed number of items per page so there is no way to align it with dates.
You create a series of date links, that would be like the date pagination links you described, which would set up queries for items in a date range using URL parameters.
Thanks, Michael.
Michael - could you expound a bit on ..."which would set up queries for items in a date range using URL parameters"....? Thanks!
You could set up URLs on your date links like <a href="/list-page?start_date=2012-01-01&end_date=2012-01-30">January 2012</a>.
Then, on the list-page, you can access those parameters using Webvanta's var syntax, to put them into an iterator condition, something link (untested):
<w:kb:item:each type="whatever-the-item-type-is" condition="published_at >= {{start_date}} && published_at <= {{end_date}}>