1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2011-05-05 20:04+0300\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
21 "The `template` directive is supplied by the [[!iki plugins/template "
22 "desc=template]] plugin."
27 "The template directive allows wiki pages to be used as templates. These "
28 "templates can be filled out and inserted into other pages in the wiki using "
29 "the directive. The [[templates]] page lists templates that can be used with "
35 "The directive has an `id` parameter that identifies the template to use. The "
36 "remaining parameters are used to fill out the template."
47 "\t\\[[!template id=note text=\"\"\"Here is the text to insert into my "
53 "This fills out the `note` template, filling in the `text` field with the "
54 "specified value, and inserts the result into the page."
59 msgid "Using a template"
64 "Generally, a value can include any markup that would be allowed in the wiki "
65 "page outside the template. Triple-quoting the value even allows quotes to be "
66 "included in it. Combined with multi-line quoted values, this allows for "
67 "large chunks of marked up text to be embedded into a template:"
73 " \\[[!template id=foo name=\"Sally\" color=\"green\" age=8 "
77 #. type: Bullet: ' * '
78 msgid "\\[[Charley]]'s sister."
81 #. type: Bullet: ' * '
82 msgid "\"I want to be an astronaut when I grow up.\""
85 #. type: Bullet: ' * '
86 msgid "Really 8 and a half."
91 msgid "Creating a template"
96 "The template is a regular wiki page, located in the `templates/` "
97 "subdirectory inside the source directory of the wiki."
102 "Alternatively, templates can be stored in a directory outside the wiki, as "
103 "files with the extension \".tmpl\". By default, these are searched for in "
104 "`/usr/share/ikiwiki/templates`, the `templatedir` setting can be used to "
105 "make another directory be searched first. When referring to templates "
106 "outside the wiki source directory, the \"id\" parameter is not interpreted "
107 "as a pagespec, and you must include the full filename of the template page, "
108 "including the \".tmpl\" extension. E.g.:"
113 msgid " \\[[!template id=blogpost.tmpl]]\n"
118 "The template uses the syntax used by the [[!cpan HTML::Template]] perl "
119 "module, which allows for some fairly complex things to be done. Consult its "
120 "documentation for the full syntax, but all you really need to know are a few "
124 #. type: Bullet: '* '
126 "Each parameter you pass to the template directive will generate a template "
127 "variable. There are also some pre-defined variables like PAGE and BASENAME."
130 #. type: Bullet: '* '
132 "To insert the value of a variable, use `<TMPL_VAR variable>`. Wiki markup in "
133 "the value will first be converted to html."
136 #. type: Bullet: '* '
138 "To insert the raw value of a variable, with wiki markup not yet converted to "
139 "html, use `<TMPL_VAR raw_variable>`."
142 #. type: Bullet: '* '
144 "To make a block of text conditional on a variable being set use `<TMPL_IF "
145 "variable>text</TMPL_IF>`."
148 #. type: Bullet: '* '
150 "To use one block of text if a variable is set and a second if it's not, use "
151 "`<TMPL_IF variable>text<TMPL_ELSE>other text</TMPL_IF>`"
155 msgid "Here's a sample template:"
161 " <span class=\"infobox\">\n"
162 " Name: \\[[<TMPL_VAR raw_name>]]<br />\n"
163 " Age: <TMPL_VAR age><br />\n"
165 " Favorite color: <TMPL_VAR color><br />\n"
167 " No favorite color.<br />\n"
171 " <TMPL_VAR notes>\n"
178 "The filled out template will be formatted the same as the rest of the page "
179 "that contains it, so you can include WikiLinks and all other forms of wiki "
180 "markup in the template. Note though that such WikiLinks will not show up as "
181 "backlinks to the page that uses the template."
186 "Note the use of \"raw_name\" inside the [[ikiwiki/WikiLink]] generator in "
187 "the example above. This ensures that if the name contains something that "
188 "might be mistaken for wiki markup, it's not converted to html before being "
189 "processed as a [[ikiwiki/WikiLink]]."
194 msgid "[[!meta robots=\"noindex, follow\"]]\n"