From GamingWiki
(16 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Positional parameters for this template are: | Positional parameters for this template are: | ||
# page | # page | ||
Line 14: | Line 5: | ||
# blurb | # blurb | ||
# content (optional) | # content (optional) | ||
− | </ | + | # label (optional) |
+ | # image (optional) | ||
+ | # parent ordinal (optional) | ||
+ | |||
+ | <onlyinclude><!-- | ||
+ | |||
+ | We may have a "userparam" specified. This will be of the form "key1;value1,key2;value2...". | ||
+ | -->{{#hashdefine: userParams | {{{userparam|}}} }}<!-- | ||
+ | -->{{#hashdefine: tmplParams}}<!-- | ||
+ | -->{{#vardefine: depth | {{#hashvalue: userParams | depth | 3 }} }}<!-- | ||
+ | |||
+ | -->{{#hashinclude: tmplParams | ||
+ | | depth = {{#var:depth}} | ||
+ | | label = {{#hashvalue: userParams | label | {{#if:{{{6|}}}|{{{6}}}|Chapter}} }} | ||
+ | | page = {{{1|M_NUL}}} | ||
+ | | title = {{{2|M_NUL}}} | ||
+ | | ordinal = {{{3|0}}} | ||
+ | | parentordinal = {{{8|}}} | ||
+ | | blurb = {{{4|}}} | ||
+ | | content = {{#hashkeyexists: userParams | nocontent || {{{5|}}} }} | ||
+ | | image = {{{7|}}} | ||
+ | |}}<!-- | ||
+ | |||
+ | -->{{#hashtotemplate: SMW campaign chapters | tmplParams }}<!-- | ||
+ | |||
+ | If we've asked for children, we print them here. | ||
+ | -->{{#ifeq:{{#hashvalue: userParams | children}}|yes|<!-- | ||
+ | -->{{#vardefine:depth | {{#expr: {{#var: depth}} + 1 }} }}<!-- | ||
+ | -->{{#vardefine:nocontent | {{#hashkeyexists: userParams | childcontent || nocontent;true}} }}<!-- | ||
+ | --> | ||
+ | {{#ask: [[parent::{{{2|M_NUL}}}||{{{1|M_NUL}}}]] | ||
+ | |?title | ||
+ | |?chapter number | ||
+ | |?blurb | ||
+ | |?content | ||
+ | |?label | ||
+ | |?image | ||
+ | |?book number | ||
+ | | sort = ordinal | ||
+ | | link = none | ||
+ | | format = template | ||
+ | | userparam = depth;{{#var:depth}},{{#var:nocontent}} | ||
+ | | template = SMW campaign chapters level N | ||
+ | }}<!-- | ||
+ | -->}}<!-- | ||
+ | |||
+ | --> | ||
+ | </onlyinclude> |
Latest revision as of 01:06, 22 September 2011
Positional parameters for this template are:
- page
- title
- ordinal
- blurb
- content (optional)
- label (optional)
- image (optional)
- parent ordinal (optional)
Chapter: M_NUL
- '