From GamingWiki
Jump to: navigation, search
Line 1: Line 1:
{{SMW campaign chapters
 
| depth  = 3
 
| label  = {{{label|Chapter}}}
 
| page    = {{{1}}}
 
| title  = {{{2}}}
 
| ordinal = {{{3|0}}}
 
| parentordinal = {{{7|}}}
 
| blurb  = {{{4|}}}
 
| content = {{{5|}}}
 
| image  = {{{6|}}}
 
}}{{#if: {{{userparam|}}} |userparam = {{{userparam}}} }}
 
<noinclude>
 
 
 
Positional parameters for this template are:
 
Positional parameters for this template are:
 
# page
 
# page
Line 19: Line 6:
 
# content (optional)
 
# content (optional)
 
# image  (optional)
 
# image  (optional)
</noinclude>
+
 
 +
<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 | {{{6|Chapter}}} }}
 +
  | page    = {{{1|M_NUL}}}
 +
  | title  = {{{2|M_NUL}}}
 +
  | ordinal = {{{3|0}}}
 +
  | parentordinal = {{{7|}}}
 +
  | blurb  = {{{4|}}}
 +
  | content = {{{5|}}}
 +
  | image  = {{{6|}}}
 +
  |}}<!--
 +
 
 +
-->{{#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 }} }}<!--
 +
  -->{{#ask: [[parent::{{{2|M_NUL}}}||{{{1|M_NUL}}}]]
 +
  |?title
 +
  |?book number
 +
  |?chapter number
 +
  |?blurb
 +
  | sort          = ordinal
 +
  | link          = none
 +
  | format        = template
 +
  | userparam    = depth;{{#var:depth}}
 +
  | template      = SMW campaign chapters level 3
 +
  }}<!--
 +
-->}}<!--
 +
 
 +
--></onlyinclude>

Revision as of 00:04, 22 September 2011

Positional parameters for this template are:

  1. page
  2. title
  3. ordinal
  4. blurb
  5. content (optional)
  6. image (optional)

Chapter: M_NUL

'