a2z

Generates an A to Z and * list for filtering content

Example

<ul class="list-inline">
  [%a2z%]
    [%param *body%]
      [%if [@form:lead@] eq [@upper@]%]
        <li class="list-inline-item"><a class="disabled" href="#" disabled>[@upper@]</a></li>
      [%else%]
        <li class="list-inline-item"><a href="[%url type:'page' id:'[@content_id@]' qs:'lead=[@upper@]'/%]">[@upper@]</a></li>
      [%/if%]
    [%/param%]
  [%/a2z%]
  <li class="list-inline-item"><a href="[%url type:'page' id:'[@content_id@]' qs:'lead='/%]">View All</a></li>
</ul>

[%thumb_list type:'content' content_type:'brand' template:'' limit:'10' filter_category:'' filter_a2z:'[@form:lead@]' sortby:'content_name' /%]

Usage

Filter content thumbnails using an A to Z filter based on the first letter of the title of the content page. For products, you would generally use the type:'a2z' on the product_filter function instead.

The sample code above gives you an A to Z filter for brands. It uses the URL tag to generate a url query for each letter that when clicked, passes the form lead value to a thumb_list to filter and display the brands. If you do not have a value for each letter you may want to expand the thumb_list code to include an *ifempty state.

Parameters

Name Options Description
`*body` HTML & b@se tags Runs a code block for each letter of the alphabet

Data Tags (body)

Name Example Description
`[@count@]` 0 A counter which will start from `0` and count for each time the body parameter runs
`[@id@]` A The letter of the result for the body param in upper-case
`[@lower@]` a The letter of the result for the body param in lower-case
`[@upper@]` A The letter of the result for the body param in upper-case

Was this article useful?

Be notified when this page is updated. Optional.