a2z

Generates an A to Z and * list for filtering content

Example

[%a2z%]
  [%param *body%]
    [%if [@form:lead@] eq [@upper@]%]
      <li><a class="disabled" href="#">[@upper@]</a></li>
    [%else%]
      <li><a href="[%url type:'page' id:'brands' qs:'lead=[@upper@]'/%]">[@upper@]</a></li>
    [%/if%]
  [%/param%]
[%/a2z%]

Usage

The primary use here is for filtering content using an A to Z filter. Best practise for products, is to use the type:'a2z' on the product_filter. This reads the content and generates the options based on the first letter of the title of the content page. The sample above gives you an A to Z for brands.

It uses the form tag to parse data between loads and uses the URL tag to generate url strings that filter the content.

Parameters

Name Options Description
*body HTML & b@se tags Runs an array for each result in the tag

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.