<tpl:Tags>

This block loops on all the tags.

Attributes

type

Selects the data type displayed. By default, tags are displayed.

limit

Limits the number of tags displayed. By default, all the tags are displayed.

sortby

By default, tags are sorted alphabetically. This attribute modifies this behaviour by taking the following value:

  • count : sorts by tag number of uses

order

Indicates in what order the tags must be sorted. Possible values are asc (ascending) and desc (descending). Default sorting is ascending.

Example

This example displays links to tags.

<ul class="tags">
  <tpl:Tags type="tag">
    <li><a href="{{tpl:TagURL}}" class="tag{{tpl:TagRoundPercent}}">{{tpl:TagID}} ({{tpl:TagEntriesCount}})</a></li>
  </tpl:Tags>
</ul>

This one displays links to tags, displaying them from the most used to the least used, with the number of articles linked to each tag.

<ul class="tags">
  <tpl:Tags type="tag" sortby="count" order="desc">
    <li><a href="{{tpl:TagURL}}" class="tag{{tpl:TagRoundPercent}}">{{tpl:TagID}} ({{tpl:TagCount}})</a></li>
  </tpl:Tags>
</ul>

Wiki powered by Dokuwiki.