How do I order list output?

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' />


<w:taxonomy name="doc-types:Tech Spec">
   <w:kb:item:each taxonomy="current">
      <div class="pdf_wide">     
      <w:unless condition="icon.blank?">
        <href="<w:file />"><img src="<w:icon rendition='thumb' />" ></a>
      <h2><w:name /></h2
      <w:description />
      <href="<w:file />">View PDF</a>

Thanks for your help!

Have more questions? Submit a request


  • 0
    Christopher Haupt

    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.

  • 0
    Patrick Schutte

    Thanks, like a 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!

  • 0
    Christopher Haupt

    This is probably a good start: You can also sort on various custom fields. Drop us a line if you get into needing to do that.

Please sign in to leave a comment.
Powered by Zendesk