From GamingWiki
Jump to: navigation, search
 
(9 intermediate revisions by the same user not shown)
Line 4: Line 4:
 
# ordinal
 
# ordinal
 
# blurb
 
# blurb
# label
 
  
 
{{Campaign timeline intro}}
 
{{Campaign timeline intro}}
 
<onlyinclude><!--
 
<onlyinclude><!--
  
-->
+
-->{{info/campaign|{{#var:campaign}}}}<!--
{{!}}-
+
-->{{#vardefine:campaignInfo|campaignInfo_{{#var:campaign}}}}<!--
{{!}} {{{1|M_NUL}}}-{{{2|M_NUL}}}-{{{3|M_NUL}}}-{{{4|M_NUL}}}-{{{5|M_NUL}}}
 
{{!}}-
 
<!-- debug
 
  
 
-->{{#hashdefine: userParams | {{{userparam|}}} }}<!--
 
-->{{#hashdefine: userParams | {{{userparam|}}} }}<!--
Line 19: Line 15:
 
-->{{#vardefine: expandbook  | {{#hashvalue: userParams | expandbook}} }}<!--
 
-->{{#vardefine: expandbook  | {{#hashvalue: userParams | expandbook}} }}<!--
  
   We can optionally specify different labels
+
   We can optionally specify different labels. Here is a somewhat complicated set of defaults:
-->{{#vardefine: booklabel    | {{#hashvalue: userParams | booklabel}} }}<!--
+
-->{{#vardefine: booklabel    | {{#hashvalue: {{#var:campaignInfo}}|Uses book label}}}}<!--
-->{{#vardefine: chapterlabel | {{#hashvalue: userParams | chapterlabel}} }}<!--
 
 
 
-->
 
{{!}} {{#var:campaign}}-{{#var:booklabel}}-
 
{{!}}-
 
<!-- debug
 
  
 
-->{{Campaign timeline bookline  
 
-->{{Campaign timeline bookline  
       | label  = {{#if:{{{5|}}}|{{{5}}}|{{#var:booklabel|Book}}}}
+
       | label  = {{#var:booklabel}}
 
       | ordinal = {{{3}}}
 
       | ordinal = {{{3}}}
 
       | title  = {{{2}}}
 
       | title  = {{{2}}}
Line 37: Line 27:
 
-->{{#if: <!--
 
-->{{#if: <!--
 
     If the current "expandbook" is set to the current book number
 
     If the current "expandbook" is set to the current book number
   -->{{#ifeq: {{#var:expandbook|latest}}| {{{3|M_NUL}}} | 1 }}}}<!--
+
   -->{{#ifeq: {{#var:expandbook|latest}}| {{{3|M_NUL}}} | 1 }}<!--
 
     or we are told to expand all books
 
     or we are told to expand all books
 
   -->{{#ifeq:{{#var:expandbook}}| all | 1 }}<!--
 
   -->{{#ifeq:{{#var:expandbook}}| all | 1 }}<!--
-->|<!--
 
  
-->
+
-->|<!-- then expand the current book
{{!}}-
 
{{!}} Expanding book {{{3|M_NUL}}}
 
{{!}}-
 
<!-- debug
 
  
 
     Run a subquery on the book's chapters
 
     Run a subquery on the book's chapters
Line 54: Line 39:
 
       |?blurb
 
       |?blurb
 
       |?label
 
       |?label
       | sort          = ordinal
+
       | sort          = ordinal,title
 
       | link          = none
 
       | link          = none
 
       | format        = template
 
       | format        = template
Line 60: Line 45:
 
       | userparam    = {{{userparam|}}}
 
       | userparam    = {{{userparam|}}}
 
       }}}}<!--
 
       }}}}<!--
-->|<!--
+
 
   -->{{#vardefine:latestbook|{{{3|}}}}}<!--
+
-->|<!-- else don't expand the current book
-->}}<!--
+
 
 +
   -->{{#vardefine:latestbook|{{{3|}}}}}<!-- this gets used higher up
 +
 
 +
-->}}<!-- end #if
 +
 
 
--></onlyinclude>
 
--></onlyinclude>
 
{{Campaign timeline outro}}
 
{{Campaign timeline outro}}

Latest revision as of 16:31, 5 October 2014

Positional parameters for this template are:

  1. page
  2. title
  3. ordinal
  4. blurb

Campaign Timeline
{{{3}}}: [[{{{1}}}|{{{2}}}]]