Difference between revisions of "Template:Honor infobox"

From Pathfinder Wiki
Line 5: Line 5:
  
 
==Example== <!--T:3-->
 
==Example== <!--T:3-->
<nowiki>{{</nowiki>{{FULLPAGENAME}}<br/>
+
<div class="toccolours">
|honorname=Camping Skills IV<br/>
+
:<nowiki>{{</nowiki>{{FULLPAGENAME}}<br/>
|skill=2<br/>
+
::|honorname=Camping Skills IV<br/>
|year=2001<br/>
+
::|skill=2<br/>
|category=Recreation<br/>
+
::|year=2001<br/>
|authority=General Conference<br/>
+
::|category=Recreation<br/>
|insignia=Camping_Skills_IV.png<br/>
+
::|authority=General Conference<br/>
|insignia_source=foo<br/>
+
::|insignia=Camping_Skills_IV.png<br/>
|master1=Wilderness<br/>
+
::|insignia_source=foo<br/>
}}
+
::|master1=Wilderness<br/>
 +
:}}
 +
</div>
  
 
<!--T:4-->
 
<!--T:4-->
Line 28: Line 30:
 
}}
 
}}
 
</noinclude>
 
</noinclude>
<includeonly>{{#vardefine:master|{{User:DesignerThan/MySandbox/GetMasterCategories|category={{{category}}}|master1={{{master1|}}}|master1_group={{{master1_group}}}|master2={{{master2|}}}|master_group2={{{master_group2}}} }} }}{{#vardefine:patch|{{#switch:{{{insignia}}}
+
<includeonly>{{#vardefine:master|{{GetMasterCategoryList|category={{{category}}}|master1={{{master1|}}}|master1_group={{{master1_group}}}|master2={{{master2|}}}|master_group2={{{master_group2}}} }} }}{{#vardefine:patch|{{#switch:{{{insignia}}}
 
|No Patch.png
 
|No Patch.png
 
|No_Patch.png={{#lst:Localization:All{{GetLangSuffix}}|No Patch}}
 
|No_Patch.png={{#lst:Localization:All{{GetLangSuffix}}|No Patch}}
Line 66: Line 68:
 
{{!}}colspan="2" id="infobox-part-of" class="infobox-value text-light bg-secondary"  {{!}}<span class="infobox-value-emphasize">{{Localize|See also}}</span><br>
 
{{!}}colspan="2" id="infobox-part-of" class="infobox-value text-light bg-secondary"  {{!}}<span class="infobox-value-emphasize">{{Localize|See also}}</span><br>
 
{{#vardefine: i | 0 }}<!--
 
{{#vardefine: i | 0 }}<!--
get all interesting links for see also into one variable seperated by | -->{{#vardefine:locSeeAlsoAll|{{#var:master}}{{User:DesignerThan/MySandbox/SeeAlso|honorname={{{honorname}}}}}}}{{#if:{{#explode: {{#var:locSeeAlsoAll}}|%{{!}}%|{{#var:i}} }} | {{#vardefine:locSeeAlsoLess|{{#explode: {{#var:locSeeAlsoAll}}|%{{!}}%|{{#var:i}} }} }}{{#vardefine: i | {{#expr: {{#var: i }} + 1 }} }}{{#while: | {{#explode: {{#var:locSeeAlsoAll}}|%{{!}}%|{{#var:i}} }} | {{#ifexpr: {{#var:i}}<3|<!--yes-->{{#vardefine:locSeeAlsoLess|{{#var:locSeeAlsoLess}}<br>{{#explode: {{#var:locSeeAlsoAll}}|%{{!}}%|{{#var:i}} }} }}|<!--no-->{{#vardefine:locSeeAlsoMore|{{#var:locSeeAlsoMore}}{{#ifexpr:{{#var:i}}>3|<br>}}{{#explode: {{#var:locSeeAlsoAll}}|%{{!}}%|{{#var:i}} }} }} }}{{#vardefine: i | {{#expr: {{#var: i }} + 1 }} }}
+
get all interesting links for see also into one variable seperated by | -->{{#vardefine:locSeeAlsoAll|{{#var:master}}{{See Also|honorname={{{honorname}}}}}}}{{#if:{{#explode: {{#var:locSeeAlsoAll}}|%{{!}}%|{{#var:i}} }} | {{#vardefine:locSeeAlsoLess|{{#explode: {{#var:locSeeAlsoAll}}|%{{!}}%|{{#var:i}} }} }}{{#vardefine: i | {{#expr: {{#var: i }} + 1 }} }}{{#while: | {{#explode: {{#var:locSeeAlsoAll}}|%{{!}}%|{{#var:i}} }} | {{#ifexpr: {{#var:i}}<3|<!--yes-->{{#vardefine:locSeeAlsoLess|{{#var:locSeeAlsoLess}}<br>{{#explode: {{#var:locSeeAlsoAll}}|%{{!}}%|{{#var:i}} }} }}|<!--no-->{{#vardefine:locSeeAlsoMore|{{#var:locSeeAlsoMore}}{{#ifexpr:{{#var:i}}>3|<br>}}{{#explode: {{#var:locSeeAlsoAll}}|%{{!}}%|{{#var:i}} }} }} }}{{#vardefine: i | {{#expr: {{#var: i }} + 1 }} }}
 
}}{{#var:locSeeAlsoLess}}{{#if: {{#var:locSeeAlsoMore}}|
 
}}{{#var:locSeeAlsoLess}}{{#if: {{#var:locSeeAlsoMore}}|
 
<div id="infobox-see-also" class="mw-collapsible mw-collapsed" data-expandtext="{{Localize|More}}" data-collapsetext="{{Localize|Less}}"><br>
 
<div id="infobox-see-also" class="mw-collapsible mw-collapsed" data-expandtext="{{Localize|More}}" data-collapsetext="{{Localize|Less}}"><br>

Revision as of 00:35, 3 February 2021

This template creates an infobox for an honor.

TODO

  • Fix broken things

Example

{{Template:Honor infobox
|honorname=Camping Skills IV
|skill=2
|year=2001
|category=Recreation
|authority=General Conference
|insignia=Camping_Skills_IV.png
|insignia_source=foo
|master1=Wilderness
}}


Camping Skills IV
Recreation
[[File:|170px|link=|alt=|]]
Skill Level
123
Approval authority
Year of Introduction

2001

See also
Wilderness Master Award
Camp Safety - Advanced
Outdoor Leadership