Difference between revisions of "Template:Honor infobox"

From Pathfinder Wiki
Line 63: Line 63:
 
{{#iferror:{{#expr:1+{{{year|X}}} }}|{{Localize|Unknown}}|{{{year}}} }}
 
{{#iferror:{{#expr:1+{{{year|X}}} }}|{{Localize|Unknown}}|{{{year}}} }}
 
{{#if:{{#var:master}}|{{!}}-
 
{{#if:{{#var:master}}|{{!}}-
{{!}}colspan="2" id="infobox-part-of" class="infobox-value text-light bg-secondary"  {{!}}<span class="infobox-value-emphasize">{{Localize|Part of}}</span>
+
{{!}}colspan="2" id="infobox-part-of" class="infobox-value text-light bg-secondary"  {{!}}<span class="infobox-value-emphasize">{{Localize|Part of}}</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}}{{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 }} }}

Revision as of 23:35, 2 February 2021

This template creates an infobox for an honor.

TODO

  • Fix broken things

Example

{{Template:Honor infobox
|honorname=Aboriginal Lore
|skill=1
|year=2001
|category=Arts, Crafts and Hobbies
|authority=General Conference
|insignia=Aboriginallore.png
}}


Aboriginal Lore
Arts, Crafts and Hobbies
[[File:|170px|link=|alt=|]]
Skill Level
123
Approval authority
Year of Introduction

2001

Part of

User:DesignerThan/MySandbox/GetMasterCategoriesUser:DesignerThan/MySandbox/SeeAlso