Warning: Declaration of action_plugin_stratatemplatery::register(Doku_Event_Handler &$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/stratatemplatery/action.php on line 24

Warning: Declaration of action_plugin_editx::register(&$contr) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/editx/action.php on line 18

Warning: Declaration of action_plugin_templatery::register(Doku_Event_Handler &$controller) should be compatible with DokuWiki_Action_Plugin::register(Doku_Event_Handler $controller) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/templatery/action.php on line 17

Warning: Cannot modify header information - headers already sent by (output started at /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/stratatemplatery/action.php:35) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/inc/auth.php on line 430

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/inc/parser/handler.php on line 1552

Warning: Declaration of syntax_plugin_templatery_wrapper::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/templatery/syntax/wrapper.php on line 49

Warning: Declaration of syntax_plugin_templatery_wrapper::render($mode, &$R, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/templatery/syntax/wrapper.php on line 105

Warning: Declaration of syntax_plugin_templatery_field::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/templatery/syntax/field.php on line 37

Warning: Declaration of syntax_plugin_templatery_field::render($mode, &$R, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/templatery/syntax/field.php on line 45

Warning: Declaration of syntax_plugin_templatery_conditional::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/templatery/syntax/conditional.php on line 48

Warning: Declaration of syntax_plugin_templatery_conditional::render($mode, &$R, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/templatery/syntax/conditional.php on line 77

Warning: Declaration of syntax_plugin_stratatemplatery_template::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/stratatemplatery/syntax/template.php on line 41

Warning: Declaration of syntax_plugin_stratatemplatery_template::render($mode, &$R, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/stratatemplatery/syntax/template.php on line 103

Warning: Declaration of syntax_plugin_stratainline_format::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/stratainline/syntax/format.php on line 36

Warning: Declaration of syntax_plugin_stratainline_format::render($mode, &$R, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/stratainline/syntax/format.php on line 92

Warning: Declaration of syntax_plugin_stratainline_entry::preprocess($match, &$result) should be compatible with syntax_plugin_strata_entry::preprocess($match, $state, $pos, &$handler, &$result) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/stratainline/syntax/entry.php on line 23

Warning: Declaration of syntax_plugin_stratainline_entry::render($mode, &$R, $data) should be compatible with syntax_plugin_strata_entry::render($mode, Doku_Renderer $R, $data) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/stratainline/syntax/entry.php on line 41

Warning: Declaration of syntax_plugin_stratainline_list::render($mode, &$R, $data) should be compatible with syntax_plugin_strata_select::render($mode, Doku_Renderer $R, $data) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/stratainline/syntax/list.php on line 48

Warning: Declaration of syntax_plugin_stratainline_refentry::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/stratainline/syntax/refentry.php on line 41

Warning: Declaration of syntax_plugin_stratainline_refentry::render($mode, &$R, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/stratainline/syntax/refentry.php on line 75

Warning: Declaration of syntax_plugin_templatery_native::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/templatery/syntax/native.php on line 70

Warning: Declaration of syntax_plugin_templatery_native::render($mode, &$R, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/templatery/syntax/native.php on line 74

Warning: Declaration of syntax_plugin_stratatemplatery_view::render($mode, &$R, $data) should be compatible with syntax_plugin_strata_select::render($mode, Doku_Renderer $R, $data) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/stratatemplatery/syntax/view.php on line 48

Warning: Declaration of syntax_plugin_stratatemplatery_entry::render($mode, &$R, $data) should be compatible with syntax_plugin_strata_entry::render($mode, Doku_Renderer $R, $data) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/stratatemplatery/syntax/entry.php on line 83

Warning: Declaration of syntax_plugin_stratatemplatery_entrywrapper::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/stratatemplatery/syntax/entrywrapper.php on line 49

Warning: Declaration of syntax_plugin_stratatemplatery_entrywrapper::render($mode, &$R, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/stratatemplatery/syntax/entrywrapper.php on line 67

Warning: Declaration of syntax_plugin_stratatemplatery_listview::render($mode, &$R, $data) should be compatible with syntax_plugin_strata_select::render($mode, Doku_Renderer $R, $data) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/stratatemplatery/syntax/listview.php on line 86

Warning: Declaration of syntax_plugin_stratatemplatery_tableview::render($mode, &$R, $data) should be compatible with syntax_plugin_strata_select::render($mode, Doku_Renderer $R, $data) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/stratatemplatery/syntax/tableview.php on line 95

Warning: Declaration of syntax_plugin_strataendpoint::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/strataendpoint/syntax.php on line 37

Warning: Declaration of syntax_plugin_strataendpoint::render($mode, &$R, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/strataendpoint/syntax.php on line 165

Warning: Declaration of syntax_plugin_templatery_section::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/templatery/syntax/section.php on line 36

Warning: Declaration of syntax_plugin_templatery_section::render($mode, &$R, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/templatery/syntax/section.php on line 40

Warning: Declaration of syntax_plugin_templatery_header::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/templatery/syntax/header.php on line 38

Warning: Declaration of syntax_plugin_templatery_header::render($mode, &$R, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/templatery/syntax/header.php on line 76

Warning: Declaration of syntax_plugin_templatery_template::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/templatery/syntax/template.php on line 37

Warning: Declaration of syntax_plugin_templatery_template::render($mode, &$R, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/templatery/syntax/template.php on line 61

Warning: Declaration of syntax_plugin_templatery_inlineconditional::handle($match, $state, $pos, &$handler) should be compatible with DokuWiki_Syntax_Plugin::handle($match, $state, $pos, Doku_Handler $handler) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/templatery/syntax/inlineconditional.php on line 49

Warning: Declaration of syntax_plugin_templatery_inlineconditional::render($mode, &$R, $data) should be compatible with DokuWiki_Syntax_Plugin::render($format, Doku_Renderer $renderer, $data) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/templatery/syntax/inlineconditional.php on line 78

Warning: Cannot modify header information - headers already sent by (output started at /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/stratatemplatery/action.php:35) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/inc/Action/Export.php on line 103

Warning: Cannot modify header information - headers already sent by (output started at /usr/home/nielsvantol/public_html/dragonseye/rpwiki/lib/plugins/stratatemplatery/action.php:35) in /usr/home/nielsvantol/public_html/dragonseye/rpwiki/inc/Action/Export.php on line 103
wiki:templatery

Table of Contents

Templatery

The templatery plugin offers the ability to write a template, and have it included in other pages with filled in fields.

Example

The anatomy of a template

Defining a template is very simple:

<template example>

This starts a new template. The template can optionally have a name ('example' in this case).

Hello, my name is: @@name@@

A piece of text with a field called 'name'.

<if organisation>
I'm a member of @@organisation@@.
</if>

A conditional piece of text. If the field 'organisation' is present, this will be displayed. If the field is not defined, the whole piece won't be used.

</template>

Finishes the template.

The actual template

The template will end up looking like this:

example

Hello, my name is: Name

With organisation

I'm a member of Organisation.

Using the template

You use the template with

{{template>wiki:templatery#example|name=Brend|organisation=University of Twente}}

This tells the wiki to use the template wiki:templatery#example.

If you do not have a full name, but something like {{template>test}} the wiki will look in the template namespace for the template.

Looks like this

Hello, my name is: Brend

I'm a member of University of Twente.

Using parameters

A template can have both named and numbered parameters.

Numbered parameters

Parameters can be numbered:

numbered

0 = 0, 1 = 1

0 = Alpha , 1 = beta

You can freely mix numbered and named parameters.

Default values

Parameters can be numbered:

defaults

a » Default value for a & B » Default value for b

Alpha & Default value for b

Conditionals

You can have conditional pieces of template:

conditionals
With A

Text if a is set. a = a

Without A

Text if a is not set. a = A

With A set

Text if a is set. a = Alpha

With A unset

Text if a is not set. a =

Inline Conditionals

Conditionals will be block-level if possible and will switch to inline if necessary.

This is useful, for example, if you have them in a list item.

You can force a conditional to be inline by prefixing it with a *.

inlineconditionals

Some With BB value of B.

Some tomato value of B.

Templates in Templates

You can include a template in a template. This allows you to reuse templates.

If you dot this, you use {{template>name of template|inside=outside}}. The variables assignments are used to remap variables from outside the template to inside the template. Any variable not mentioned is available under it's old name.

recursion

0 = 0

With 1

wiki:templatery#recursion : 1 → 0, 2 → 1, 3 → 2, 4 → 3

0 = Alpha

0 = Beta

0 = Gamma

0 = Delta