aboutsummaryrefslogtreecommitdiff
path: root/ikiwiki/directive/index.html
blob: 8dabb090c8efbcd587c473e5b2338a805fa77e46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>directive</title>

<link rel="stylesheet" href="../../bootstrap/css/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="../../bootstrap/css/bootstrap-responsive.min.css" />

<link rel="stylesheet" href="../../local.css" type="text/css" />




<meta name="robots" content="noindex, follow" />
<style type="text/css">
@media (max-width: 979px) {
  .navbar-fixed-top {
    position: fixed;
    margin-left: 0px;
    margin-right: 0px;
  }
}
</style>
</head>
<body>

<div class="container">

  <div class="row-fluid">
    <div class="span12">
      <h1></h1>

      <ul class="breadcrumb">
      
          <li><a href="../../">Cache Saravento</a> <span class="divider">/</span> </li>
      
          <li><a href="../">ikiwiki</a> <span class="divider">/</span> </li>
      
      <li>directive</li>
      <li><span class="divider">|</span> <a href="../../tarefas">Tarefas</a></li>
      <li><span class="divider">|</span> <a href="https://git.sarava.org/?p=cache.git;a=history;f=ikiwiki/directive.mdwn">Histórico</a></li>
      <li><span class="divider">|</span> <a href="https://git.sarava.org/?p=cache.git;a=atom">Feed</a></li>
      </ul>
    </div>
  </div>

  <div class="page row-fluid">

  <div>
    <div class="pageheader">
    <div class="header">
    <h1>
    directive
    
    </h1>
    
    </div>

    </div>

    <div id="pagebody">

    <div id="content">
    <p class="pagedate">
    <strong>Posted <span class="date">Sex 13 Mai 2011 13:06:00 BRT</span></strong>
    </p>
    <p>Directives are similar to a <a href="../wikilink/">WikiLink</a> in form, except they
begin with <code>!</code> and may contain parameters. The general form is:</p>

<pre><code>[[!directive  param="value" param="value"]]
</code></pre>

<p>This gets expanded before the rest of the page is processed, and can be used
to transform the page in various ways.</p>

<p>The quotes around values can be omitted if the value is a simple word.
Also, some directives may use parameters without values, for example:</p>

<pre><code>[[!tag  foo]]
</code></pre>

<p>A directive does not need to all be on one line, it can be
wrapped to multiple lines if you like:</p>

<pre><code>[[!directive  foo="baldersnatch"
bar="supercalifragilisticexpialidocious" baz=11]]
</code></pre>

<p>Also, multiple lines of <em>quoted</em> text can be used for a value.
To allow quote marks inside the quoted text, delimit the block
of text with triple-double-quotes or triple-single-quotes:</p>

<pre><code>[[!directive  text="""
1. "foo"
2. "bar"
3. "baz"
""" othertext='''
1. 'quux'
2. "foo"
''']]
</code></pre>

<p>If you want to put text with triple quotes into a parameter value, you can
use perl-style here-doc syntax, even nesting it like this:</p>

<pre><code>[[!directive  text=&lt;&lt;OUTER
[[!otherdirective &lt;&lt;INNER
inner text
INNER]]
outer text
OUTER]]
</code></pre>

<p>ikiwiki also has an older syntax for directives, which requires a space in
directives to distinguish them from <a href="../wikilink/">wikilinks</a>. This
syntax has several disadvantages: it requires a space after directives with
no parameters (such as <code>[[pagecount ]]</code>), and it prohibits spaces in
<a href="../wikilink/">wikilinks</a>.  ikiwiki now provides the <code>!</code>-prefixed
syntax shown above as default.  However, ikiwiki still supports wikis using
the older syntax, if the <code>prefix_directives</code> option is disabled.</p>

    </div>

    <hr />

    
    
    

    </div>

    <div id="footer" class="pagefooter">
    
    <div id="pageinfo">

    

    
    <div id="backlinks">
    Links:
    
    <a href="../formatting/">formatting</a>
    
    <a href="../">ikiwiki</a>
    
    <a href="../markdown/">markdown</a>
    
    <a href="../pagespec/sorting/">pagespec/sorting</a>
    
    <a href="../../shortcuts/">shortcuts</a>
    
    
    </div>
    

    

    

    <!--<div class="pagedate">
    Last edited <span class="date">Sex 13 Mai 2011 13:06:00 BRT</span>
    </div> -->

    </div>
    
    
    <!-- from Cache Saravento -->
    </div>

  </div>

  <div class="span4">

    

  </div>

  </div>
</div>

</body>
</html>