]> sipb.mit.edu Git - ikiwiki.git/blob - doc/plugins/testpagespec.mdwn
fix header
[ikiwiki.git] / doc / plugins / testpagespec.mdwn
1 [[template id=plugin name=testpagespec author="[[Joey]]"]]
2 [[tag type/useful]]
3
4 This plugin allows testing a [[PageSpec]] to see if it matches a page, and
5 to see the part that matches, or causes the match to fail.
6
7 Example uses:
8
9         \[[testpagespec pagespec="foopage and barpage" match="foopage"]]
10
11 This will print out something like "no match: barpage does not match foopage",
12 highlighting which part of the [[PageSpec]] is causing the match to fail.
13         
14         \[[testpagespec pagespec="foopage or !bar*" match="barpage"]]
15
16 This will print out something like "no match: bar* matches barpage", since
17 the part of the [[PageSpec]] that fails is this negated match.
18         
19         \[[testpagespec pagespec="foopage or barpage" match="barpage"]]
20
21 This will print out something like "match: barpage matches barpage",
22 indicating the part of the [[PageSpec]] that caused it to match.