From GamingWiki
Jump to: navigation, search
 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:
=== Chapter {{{3}}}: {{{2}}} ===
 
 
{{#if: {{{5|}}} <!--
 
  -->|
 
{{{5}}}
 
<!--
 
  -->|
 
: ''{{{4}}} [<nowiki />[[{{{1}}}|full synopsis]]]''
 
<!--
 
-->}}
 
<noinclude>
 
 
 
Positional parameters for this template are:
 
Positional parameters for this template are:
 
# page
 
# page
Line 17: Line 5:
 
# blurb
 
# blurb
 
# content (optional)
 
# content (optional)
</noinclude>
+
# 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:

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

Chapter: M_NUL

'