I’m attempting to find a solution to allow users to sort content that is being output by a CMS while maintaining pagination.
I’ve got 50+ articles, and after 10 articles, I need to start pagination. I’ve found several jQuery plugins that handle pagination no problem.
I’ll have a dropdown with options so the user can sort the info (Oldest to newest, A-Z, newest to oldest).
The info is not presented in tables, but rather content is in divs, like this:
<label for="sort">Sort</label>
<select name="sort">
<option value="A-Z">A-Z</option>
<option value="Oldest to Newest">Oldest to Newest</option>
<option value="Newest to Oldest">Newest to Oldest</option>
</select>
<div>
<h1>Cool Title Here</h1>
<p class="date">6-5-10</p>
<p>Content Goes Here. <a href="#">read more</a></p>
</div>
<div>
<h1>It rains in Spain</h1>
<p class="date">5-8-10</p>
<p>Content Goes Here. <a href="#">read more</a></p>
</div>
<div>
<h1>Another Cool Title</h1>
<p class="date">4-15-10</p>
<p>Content Goes Here. <a href="#">read more</a></p>
</div>
Pagination Options will go here.
Not sure if anyone has found a solution that is able to tackle both of these issues.
Thanks to everyone who posted above. I just went ahead and hired someone to do this through my CMS since I was under a time crunch. Turns out through PHP the developer was able to get this functionality working.