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