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_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_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_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_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_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_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_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_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_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
Strata Templatery
Combining templates and data is a good way to display a lot of data while still keeping it readable.
Example
The Template
First we need a template:
The Data
Second, we need some data:
Alice (example_person) |
Name | Alice the First |
Knows_ref | #Bob, #Donna |
Bob (example_person) |
Name | Bob the Builder |
Knows_ref | #Alice |
Carol (example_person) |
Name | Carol the Third |
Knows_ref | #Donna, #Alice |
Declaring data is done as described by Entering Data.
Entering data with a template
By giving a template in data entry, you can format an entry as well:
<data example_person #Donna>
template {
wiki:stratatemplatery
}
Name: Donna the Doer
Knows_ref*: #Alice, #Carol
</data>
Donna the Doer
Note: By prefixing a class with !
, you can get a quick template on the data entry. Though this relies on being able to get the template from the template: namespace, and you can't use a #name
style template. For example:
<data !example_person #Donna>
Name: Donna the Doer
Knows_ref*: #Alice, #Carol
</data>
This example would use the template:example_person template.
The View
Now we can combine the data and the template:
<view ?name ?knows>
template {
manuals:stratatemplatery
}
?p is a: example_person
?p entry title: ?name
?p Knows_ref: ?knows
group {
?p
?name
}
</view>
The <view> works exactly like Asking Questions, with the addition of the template
group.
The result:
Alice
Bob
Carol
Donna
Lists
Lists can be template as well. This offers the option of displaying a list with customized items for each result.
<listview ?name ?knows>
?p is a: example_person
?p entry title: ?name
?p Knows_ref: ?knows
group {
?p
?name
}
<view>
**@@name@@** -> @@knows@@
</listview>
The example code will result in:
<listview ?name ?knows>
?p is a: example_person
?p entry title: ?name
?p Knows_ref: ?knows
group {
?p
?name
}
<view>
name → knows
</listview>
Template with types
You can use types and aggregations in fields in the template. For example rating@max_stars will determine the maximum value of the 'rating' field in the query, and display this with the 'stars' type.
Typed Templates
You can use types in vanilla templates as well. This allows you to display nicer templates without extra effort.
An example: a
With explicit type: B_ref
When filled in with a_wiki=5 ^_^ + 7 8-)
and b=playground:playground
this gives the following:
An example:
With explicit type: