Difference between revisions of "Template:Honor infobox"
From Pathfinder Wiki
DesignerThan (talk | contribs) |
DesignerThan (talk | contribs) |
||
Line 27: | Line 27: | ||
}} | }} | ||
</noinclude> | </noinclude> | ||
− | <includeonly>{{#vardefine:master|{{ | + | <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}}} |
|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 64: | Line 64: | ||
{{#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> | ||
− | {{# | + | {{#vardefine: i | 0 }}<!-- |
− | {{#vardefine: | + | 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 }} }} |
− | {{#if: {{#var: | + | }}{{#var:locSeeAlsoLess}}{{#if: {{#var:locSeeAlsoMore}}| |
<div id="infobox-see-also" class="mw-collapsible mw-collapsed" data-expandtext="show" data-collapsetext="hide"><br> | <div id="infobox-see-also" class="mw-collapsible mw-collapsed" data-expandtext="show" data-collapsetext="hide"><br> | ||
− | {{#var: | + | {{#var:locSeeAlsoMore}} |
− | </div>}} | + | </div>}} }} |
}} | }} | ||
|- | |- |
Revision as of 23:34, 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 | |
Cannot access the database: :real_connect(): (08004/1040): Too many connections
| |
Skill Level 123 | |
Approval authority |
Year of Introduction 2001 |
Part of
User:DesignerThan/MySandbox/GetMasterCategoriesUser:DesignerThan/MySandbox/SeeAlso | |