From GamingWiki
Jump to: navigation, search
(Undo revision 5818 by Dave (talk))
Line 1: Line 1:
This template accepts one parameter, a campaign name. It looks for a template called <code>Template: [campaign name]/Campaign box</code>, transcluding it if it's there. Otherwise, it passes the parameter on to [[Template: campaign box]].
+
<!--
 +
 
 +
  Initial queries
 +
-->{{#vardefine: campaign | {{{campaign|{{{1<noinclude>|Steel Town</noinclude>}}} }}} }}<!--
 +
-->{{#vardefine: campaignimage | <!--{{#ask: [[{{#var:campaign}}]] | mainlabel=- | ?image= | link=none }}--> }}<!--
 +
 
 +
-->{{#hashdefine:paramHash}}<!--
 +
-->{{#hashinclude: paramHash
 +
| title    = [[{{#var:campaign}}]] Navigation
 +
| template name = {{{template name|Campaign box}}}
 +
| collapse_state = <includeonly>{{{1|autocollapse}}}</includeonly><noinclude>expanded</noinclude>
 +
}}<!--
 +
 
 +
-->{{#if: {{#var: campaignimage}} | {{#hashinclude: paramHash | image = {{#var: campaignimage}} }} }}<!--
 +
 
 +
-->{{#arraydefine: pclist |<!--
 +
  -->{{#ask: [[is PC in campaign :: {{#var:campaign}}]] | format=list | order=asc | sep=:: | link=none | limit=20 | searchlabel= }}<!--
 +
-->|::}}<!--
 +
-->{{#hashinclude: paramHash
 +
  | group1 = PCs
 +
  | list1  = {{#arrayprint:pclist| :: | $pc$ | [[$pc$]] }}
 +
  }}<!--
 +
 
 +
-->{{#if: <!--
 +
  -->{{#arraydefine: facelist|<!--
 +
      -->{{#ask: [[face in campaign :: {{#var:campaign}}]] |format=list|order=asc|sep=::|link=none|limit=20|searchlabel=}}<!--
 +
  -->|::|print=list}}<!--
 +
-->|<!--
 +
  -->{{#hashinclude: paramHash
 +
      | group2 = Faces
 +
      | list2  = {{#arrayprint: facelist| :: | $face$ | [[$face]] }}
 +
      }}<!--
 +
-->}}<!--
 +
 
 +
-->{{#if: <!--
 +
  -->{{#arraydefine: npclist |<!--
 +
      -->{{#ask: [[NPC in campaign :: {{#var:campaign}}]] |format=list|order=asc|sep=::|link=none|limit=20|searchlabel=}}<!--
 +
  -->| :: | print=list}}<!--
 +
-->|<!--
 +
  -->{{#hashinclude: paramHash
 +
      | group3 = NPCs
 +
      | list3  = {{#arrayprint: npclist | :: | $npc$ | [[$npc$]] }}
 +
      }}<!--
 +
-->}}<!--
  
<!--
+
-->{{#if: <!--
 +
  -->{{#arraydefine: Mnpclist |<!--
 +
      -->{{#ask: [[major NPC in campaign :: {{#var:campaign}}]] |format=list|order=asc|sep=::|link=none|limit=20|searchlabel=}}<!--
 +
  -->| :: | print=list}}<!--
 +
-->|<!--
 +
  -->{{#hashinclude: paramHash
 +
      | group3 = Major NPCs
 +
      | list3  = {{#arrayprint: Mnpclist | :: | $npc$ | [[$npc$]] }}
 +
      }}<!--
 +
-->}}<!--
 +
-->{{#if: <!--
 +
  -->{{#arraydefine: mnpclist |<!--
 +
      -->{{#ask: [[minor NPC in campaign :: {{#var:campaign}}]] |format=list|order=asc|sep=::|link=none|limit=20|searchlabel=}}<!--
 +
  -->|::|print=list}}<!--
 +
-->|<!--
 +
  -->{{#hashinclude: paramHash
 +
      | group4 = Minor NPCs
 +
      | list4  = {{#arrayprint: mnpclist | :: | $npc$ | [[$npc$]] }}
 +
      }}<!--
 +
-->}}<!--
 +
 
 +
-->{{#if: <!--
 +
  -->{{#arraydefine: orglist|<!--
 +
      -->{{#ask: [[organization in campaign :: {{#var:campaign}}]] |format=list|order=asc|sep=::|link=none|limit=20|searchlabel=}}<!--
 +
  -->|::|print=list}}<!--
 +
-->|<!--
 +
  -->{{#hashinclude: paramHash
 +
      | group5 = Groups and organizations
 +
      | list5  = {{#arrayprint: orglist | :: | $org$ | [[$org$]] }}
 +
      }}<!--
 +
-->}}<!--
  
--><onlyinclude><!--
+
-->{{#if: <!--
-->{{#if:{{#vardefineecho:campaign|{{{1|}}}}}<!--
+
  -->{{#arraydefine: locationlist|<!--
  -->|{{#ifexist: Template: {{#var:campaign}}/Campaign box<!--
+
      -->{{#ask: [[location in campaign :: {{#var:campaign}}]] |format=list|order=asc|sep=::|link=none|limit=20|searchlabel=}}<!--
      -->|{{Template: {{#var:campaign}}/Campaign box}}<!--
+
  -->|::|print=list}}<!--
      -->|{{Template: campaign box|{{#var:campaign}}}}<!--
+
-->|<!--
  -->}}<!--
+
  -->{{#hashinclude: paramHash
 +
      | group6 = Locations
 +
      | list6  = {{#arrayprint: locationlist | :: | $loc$ | [[$loc$]] }}  
 +
      }}<!--
 
-->}}<!--
 
-->}}<!--
--></onlyinclude><!--
 
  
-->
+
--><!-- {{#hashprint: paramHash}} --><!--
 +
-->{{#hashtotemplate:Campaign navigation box | paramHash }} <!-- -->

Revision as of 15:37, 15 January 2016