release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide
translations



Search | Go
Wiki > Main > UsingCategoryTags

How to use Category tags

Overview

A category tag is nothing special, really. It's just a single line of text that twiki can search for and thus create an index of the pages which have it.

Tag pages

Add an empty line to the end of the page you want indexed:

CategoryFoo: Description

It is important that the category tag is the only thing on that line. It might be a good idea to put a separator (---) above the category line, to clearly mark it as metadata and not part of the page body.

Create an index page

The index page is simply using a %SEARCH% expression to find all pages with the category tag.

An example expression is this:

%SEARCH{"^CategoryHowto:" regex="on" type="regex" nototal="on" nosearch="on" format=" * $topic - $pattern(.*?CategoryHowto:([^ \r]*).*)" }%

...which results in this output:


See TWikiVariables for the syntax of %SEARCH% and FormattedSearch for the formatting syntax of the header and format attributes.

r2 - 02 Apr 2021 - 20:46:07 - UnknownUser

Copyright © by the contributing authors.