Downloads
release
dev builds
extras
themes
Documentation
manual
wiki
device status
Support
forums
mailing lists
IRC
Development
bugs
patches
dev guide
Search
Search
| Go
Wiki
>
Main
>
UsingCategoryTags
---+!! How to use Category tags %TOC% ---++ 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 %<nop>SEARCH% expression to find all pages with the category tag. An example expression is this: %<nop>SEARCH{"^CategoryHowto:" regex="on" type="regex" nototal="on" nosearch="on" format=" * $topic - $pattern(.*?CategoryHowto:([^\n\r]*).*)" }% ...which results in this output: --- %SEARCH{"^CategoryHowto:" regex="on" type="regex" nototal="on" nosearch="on" header="*Howtos:*" format=" * $topic - $pattern(.*?CategoryHowto:([^\n\r]*).*)" }% --- See TWiki.TWikiVariables for the syntax of %<nop>SEARCH% and TWiki.FormattedSearch for the formatting syntax of the =header= and =format= attributes.
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r1
|
B
acklinks
|
V
iew topic
|
M
ore topic actions
r1 - 18 Jun 2004 - 14:33:00 -
BjornStenberg
Copyright © by the contributing authors.