<ev:sortpage>
Builds a complete select and a containing form, which maintains the current page query parameters as hidden input fields. The form will auto submit if the select box changes.
<ev:sortpage>
requires the page to have a Search object.
If the page has less than 2 results the sort box will not appear.
<ev:sortpage>
is a very simple tag, but does a lot behind the scenes.
<ev:sortpage object="search">
<option value="price:asc">Price low to high</option>
<option value="price:desc">Price high to low</option>
<option value="sequence:asc">By Recommendation</option>
<option value="age:desc">Newest to oldest</option>
<option value="age:asc">Oldest to newset</option>
<option value="title:asc">Title A-Z</option>
<option value="title:desc">Title Z-A</option>
</ev:sortpage>
Attributes |
---|
object
Any string which references a Search object. |
Adding Options
Although <ev:sortpage>
knows whether an option value is valid, it allows you to add the
options you require for your page. If the tag doesn't recognise the value, it simply won't output it. This is useful
as it gives you control over the labels for each option.
Oh yeah, the HTML within the <ev:sortpage>
tag must be valid XML and
must only consist of option tags, it will ignore other tag types.