]> sipb.mit.edu Git - ikiwiki.git/blob - doc/preprocessordirective.mdwn
web commit by arpitjain11: Gallery Plugin added
[ikiwiki.git] / doc / preprocessordirective.mdwn
1 Preprocessor directives are similar to a [[WikiLink]] in form, except they
2 contain spaces and parameters. The general form is:
3
4         \[[directive param="value" param="value"]]
5
6 This gets expanded before the rest of the page is processed, and can be used
7 to transform the page in various ways.
8
9 The quotes around values can be omitted if the value is a simple word.
10 Also, some directives may use parameters without values, for example:
11
12         \[[tag foo]]
13
14 Note that if a preprocessor directive has no parameters, a space still must
15 be put after its name, to avoid confusion with a [[WikiLink]]. For example:
16
17         \[[pagecount ]]
18
19 A preprocessor directive does not need to all be on one line, it can be
20 wrapped to multiple lines if you like:
21         
22         \[[directive foo="baldersnatch"
23         bar="supercalifragalisticexpealadocious" baz=11]]
24
25 Also, multiple lines of *quoted* text can be used for a value.
26 To allow quote marks inside the quoted text, delimit the block
27 of text with triple-quotes:
28
29         \[[directive text="""
30         1. "foo"
31         2. "bar"
32         3. "baz"
33         """]]