Patrick Schutte
posted this on July 13, 2011, 16:24
I want to display a set of documents in alphabetical order and not the order they were entered into the database.
The docs are displayed via this code:
<w:snippet name='tech-specs-list' />
Snippet:
<w:taxonomy name="doc-types:Tech Spec">
<w:kb:item:each taxonomy="current">
<div class="pdf_wide">
<w:unless condition="icon.blank?">
<a href="<w:file />"><img src="<w:icon rendition='thumb' />" ></a>
</w:unless>
<h2><w:name /></h2>
<p>
<w:description />
<a href="<w:file />">View PDF</a>
</p>
</div>
</w:kb:item:each>
</w:taxonomy>
Thanks for your help!
Comments
Try adding the sort attribute to the item:each iterator:
<w:kb:item:each taxonomy="current" sort="name ASC">
This should sort the items alphabetically by name in ASCending order.
Thanks, Chris...works like a charm...is there are resource of the different sort options? I tried searching for something before asking the question, but did not come up with anything. Thanks again!
This is probably a good start: http://support.webvanta.com/article/76669-accessing-database-inform.... You can also sort on various custom fields. Drop us a line if you get into needing to do that.