|
|
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
| + | --><onlyinclude><!-- |
− | -->{{#vardefine: campaign | {{{campaign|{{{1<noinclude>|Steel Town</noinclude>}}} }}} }}<!-- | + | -->{{#if:{{#vardefineecho:campaign|{{{1|}}}}}<!-- |
− | -->{{#vardefine: campaignimage | <!--{{#ask: [[{{#var:campaign}}]] | mainlabel=- | ?image= | link=none }}--> }}<!-- | + | -->|{{#ifexist: Template: {{#var:campaign}}/Campaign box<!-- |
− | | + | -->|{{Template: {{#var:campaign}}/Campaign box}}<!-- |
− | -->{{#hashdefine:paramHash}}<!--
| + | -->|{{Template: campaign box|{{#var:campaign}}}}<!-- |
− | -->{{#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$]] }}
| |
− | }}<!--
| |
− | -->}}<!--
| |
− | | |
− | -->{{#if: <!--
| |
− | -->{{#arraydefine: locationlist|<!--
| |
− | -->{{#ask: [[location in campaign :: {{#var:campaign}}]] |format=list|order=asc|sep=::|link=none|limit=20|searchlabel=}}<!--
| |
− | -->|::|print=list}}<!--
| |
− | -->|<!--
| |
− | -->{{#hashinclude: paramHash
| |
− | | group6 = Locations
| |
− | | list6 = {{#arrayprint: locationlist | :: | $loc$ | [[$loc$]] }}
| |
− | }}<!--
| |
| -->}}<!-- | | -->}}<!-- |
| + | --></onlyinclude><!-- |
| | | |
− | --><!-- {{#hashprint: paramHash}} --><!--
| + | --> |
− | -->{{#hashtotemplate:Campaign navigation box | paramHash }} <!-- -->
| |