From GamingWiki
Jump to: navigation, search
Line 5: Line 5:
 
-->{{#vardefine:booklabel|{{{booklabel|Book}}} }}<!--
 
-->{{#vardefine:booklabel|{{{booklabel|Book}}} }}<!--
 
-->{{#vardefine:chapterlabel|{{{chapterlabel|Chapter}}} }}<!--
 
-->{{#vardefine:chapterlabel|{{{chapterlabel|Chapter}}} }}<!--
-->{{#vardefine: expandbook | {{{expandbook| {{#show: {{PAGENAME}} | ?book number | link=none }} }}} | latest }}<!--
+
-->{{#vardefine: expandbook | {{{expandbook| {{#show: {{PAGENAME}} | ?book number | link=none | default=latest }} }}} | latest }}<!--
  
 
   Use intro and outro templates so we can use this with SMW.
 
   Use intro and outro templates so we can use this with SMW.
 
-->{{#vardefineecho:intro|{{Campaign timeline intro | cssclass={{{cssclass|}}} | campaign={{#var:campaign}} }} }}<!--
 
-->{{#vardefineecho:intro|{{Campaign timeline intro | cssclass={{{cssclass|}}} | campaign={{#var:campaign}} }} }}<!--
--><!-- {{#var:intro}} --><!--
 
 
-->{{#ask: [[book of campaign::{{#var:campaign}}]]
 
-->{{#ask: [[book of campaign::{{#var:campaign}}]]
 
|?title=
 
|?title=
Line 19: Line 18:
 
| format        = template
 
| format        = template
 
| template      = SMW campaign timeline
 
| template      = SMW campaign timeline
| userparam    = expandbook ; {{#var:expandbook|latest}}
+
| userparam    = expandbook ; {{#var:expandbook}}
 
}}<!--
 
}}<!--
 +
 +
-->{{#ifeq:{{#var:expandbook}}|latest|{{#if:{{#var:latestbook}}|<!--
 +
    Run a subquery on the book's chapters
 +
  -->{{#vardefineecho:innerqueryresult|{{#ask: [[chapter in book::{{#var:latestbook}}]]
 +
      |?title
 +
      |?ordinal
 +
      |?blurb
 +
      |?label
 +
      | sort          = ordinal
 +
      | link          = none
 +
      | format        = template
 +
      | template      = SMW campaign chapter
 +
      }}}}<!--
 +
-->}}<!-- -->}}<!--
  
 
   Use intro and outro templates so we can use this with SMW.
 
   Use intro and outro templates so we can use this with SMW.

Revision as of 16:42, 25 October 2011

Campaign Timeline
?title= ?ordinal= ?blurb= ?label= sort = ordinal link = none format = template template = SMW campaign timeline ?book number | link=none | default=latest }}

}}