1 [[!meta robots="noindex, follow"]]
2 Directives are similar to a [[ikiwiki/WikiLink]] in form, except they
3 begin with `!` and may contain parameters. The general form is:
5 \[[!directive param="value" param="value"]]
7 This gets expanded before the rest of the page is processed, and can be used
8 to transform the page in various ways.
10 The quotes around values can be omitted if the value is a simple word.
11 Also, some directives may use parameters without values, for example:
15 A directive does not need to all be on one line, it can be
16 wrapped to multiple lines if you like:
18 \[[!directive foo="baldersnatch"
19 bar="supercalifragilisticexpialidocious" baz=11]]
21 Also, multiple lines of *quoted* text can be used for a value.
22 To allow quote marks inside the quoted text, delimit the block
23 of text with triple-double-quotes or triple-single-quotes:
25 \[[!directive text="""
34 If you want to put text with triple quotes into a parameter value, you can
35 use perl-style here-doc syntax, even nesting it like this:
37 \[[!directive text=<<OUTER
38 [[!otherdirective <<INNER
44 ikiwiki also has an older syntax for directives, which requires a space in
45 directives to distinguish them from [[wikilinks|ikiwiki/wikilink]]. This
46 syntax has several disadvantages: it requires a space after directives with
47 no parameters (such as `\[[pagecount ]]`), and it prohibits spaces in
48 [[wikilinks|ikiwiki/wikilink]]. ikiwiki now provides the `!`-prefixed
49 syntax shown above as default. However, ikiwiki still supports wikis using
50 the older syntax, if the `prefix_directives` option is disabled.
52 [[!if test="enabled(listdirectives)" then="""
53 Here is a list of currently available directives in this wiki: