From GamingWiki
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 3: Line 3:
  
 
--><onlyinclude><!--
 
--><onlyinclude><!--
 +
 +
  Process template parameters
 +
 +
  The campaign is either defined as campaign=foo or passed as the first parameter.
 +
  If it is omitted, we check that the current page is the campaign. This allows us
 +
  to conveniently call the template with no parameters while on the campaign page.
 
-->{{#vardefine: campaign    | {{{campaign|{{{1| {{#show: {{PAGENAME}} | ?campaign#}} }}} }}} }}<!--
 
-->{{#vardefine: campaign    | {{{campaign|{{{1| {{#show: {{PAGENAME}} | ?campaign#}} }}} }}} }}<!--
 +
--><noinclude>{{#vardefine: campaign | Humans are the Worst }}</noinclude><!--
 +
 +
  Should we expand volumes and books?
 +
-->{{#vardefine: expand    | {{{expand|all}}} }}<!--
 +
 +
-->{{#if:{{#var:campaign}}|<!--
  
--><noinclude>{{#vardefine: campaign | Steel Town }}</noinclude><!--
+
  Other possible params include:
 +
  * volume : Only display books from the given volume (unsupported)
 +
  * book : Only display chapters from the given book
 +
  * chapter : Only display the given chapter
  
 +
  @todo Collect params and pass them to Campaign_history/books. If book was specified this will
 +
  print out just that book. Otherwise it will look for any books and print them all out. If no
 +
  books are found it will simply print out all chapters for this campaign using the template
 +
  Campaign_history/chapters
 +
 +
-->{{#parameterstohash: paramHash}}<!--
 +
-->{{#hashinclude:      paramHash
 +
  | campaign = {{#var:campaign}}
 +
  }}<!--
 +
  | expand = {{#var:expand}}
 +
-->{{#hashtotemplate:  Campaign_history/books | paramHash }}<!--
 +
 +
 +
  @todo kill this?
 
   Find out if this is a book or a chapter:
 
   Find out if this is a book or a chapter:
 
-->{{#vardefine: parent |<!--
 
-->{{#vardefine: parent |<!--
Line 22: Line 51:
  
 
   Timeline goes first
 
   Timeline goes first
-->{{#vardefine:timeline|{{Campaign timeline | {{#var:campaign}} }} }}<!--
+
--><!--{{#vardefine:timeline|{{Campaign timeline | {{#var:campaign}} }} }}--><!--
-->{{#var:timeline}}<!--
+
--><!--{{#var:timeline}}--><!--
  
 
   Set SMW properties and category memberships
 
   Set SMW properties and category memberships
Line 114: Line 143:
 
}}<!--
 
}}<!--
  
 +
-->|<!-- else !var:campaign
 +
 +
  -->{{Error|No campaign specified for template "Campaign history"}}<!--
 +
 +
-->}}<!-- end if var:campaign
 
--></onlyinclude>
 
--></onlyinclude>
 
[[Category: campaign templates]]
 

Latest revision as of 14:36, 18 October 2014

[edit] [purge]
Error creating thumbnail: File missing
Template documentation

Given a campaign name, print out a summary of the whole campaign history.

Usage[edit]

{{Campaign history | Humans are the Worst}}

Parameters[edit]

campaign[edit]

Specify the campaign to query. May be specified with the parameter name or as the first parameter, so the following are equivalent:

{{Campaign history | Humans are the Worst}}
{{Campaign history | campaign=Humans are the Worst}}

This parameter may be omitted when used on a campaign page, and will use Campaign history as the campaign name.

expand[edit]

Should volumes and books be expanded to show their contents? Valid values are:

  • all (default): expand everything, showing all chapters
  • book: expand to the level of books. The blurb and other details for each book are displayed, as well as links to each chapter. However, chapter details are hidden.
  • volume: expand to the level of volumes. The blurb and other details for each volume are displayed, as well as links to each book and to each chapter. However, book and chapter details are hidden.
  • none: Don't expand anything. Only list volume, book and chapter titles with no blurbs or other information.

Book {{{book number}}}

Book {{{book number}}}, [[{{{page}}}|Chapter {{{chapter number}}}]]

Book {{{book number}}}, [[{{{page}}}|Chapter {{{chapter number}}}]]


Book {{{book number}}}

Book {{{book number}}}, [[{{{page}}}|Chapter {{{chapter number}}}]]

Book {{{book number}}}, [[{{{page}}}|Chapter {{{chapter number}}}]]

{{#set:

  | title  = Story title
  | is a   = book
  | book of = Humans are the Worst

}}{{#set: book number = {{#ask: M_NUL |?ordinal= | link=none |searchlabel= }} }}

Story title

(played [[session date::{{{date}}}]])

{{#ask: |Story title |?title |?chapter number |?blurb |?empty |?label |?image |?parentordinal | sort = chapter number | link = none | format = template | template = SMW campaign chapters level 3 }}