Difference between revisions of "Template:Honor infobox"

From Pathfinder Wiki
Line 40: Line 40:
 
}}|{{Localize|No Patch|Images}}}}}}<!--
 
}}|{{Localize|No Patch|Images}}}}}}<!--
 
check if Not availabel at AdventSource should be shown
 
check if Not availabel at AdventSource should be shown
-->{{#vardefine:showNotAdventSrc|{{#ifeq:{{{state}}}|piloting|true|{{#if:{{{insignia_source|{{GetHonorMetaData|language=/en|parameter=insignia_source}}}}}|true|false}}}}}}
+
-->{{#vardefine:honorstate|{{{state|{{GetHonorMetaData|language=/en|parameter=state}}}}}}}{{#vardefine:showNotAdventSrc|{{#ifeq:{{#var:honorstate}}|piloting|true|{{#if:{{{insignia_source|{{GetHonorMetaData|language=/en|parameter=insignia_source}}}}}|true|false}}}}}}
 
<templatestyles src="Honor infobox/style.css" /><div class="mw-parser-output noprint">
 
<templatestyles src="Honor infobox/style.css" /><div class="mw-parser-output noprint">
 
{{Infobox
 
{{Infobox
 
|bodyclass=honor-infobox
 
|bodyclass=honor-infobox
|above={{#ifeq:{{{state}}}|piloting|NAD Pilot for|{{GetHonorName|page={{{honorlandingpage|}}}}}}}
+
|above={{#ifeq:{{#var:honorstate}}|piloting|NAD Pilot for|{{GetHonorName|page={{{honorlandingpage|}}}}}}}
|subheader={{#ifeq:{{{state}}}|piloting|{{GetHonorName|page={{{honorlandingpage|}}}}}}}
+
|subheader={{#ifeq:{{#var:honorstate}}|piloting|{{GetHonorName|page={{{honorlandingpage|}}}}}}}
 
|subheader2=[[AY Honors/{{#var:localCategory}}{{GetLangSuffix}}|{{Localize|{{#var:localCategory}}}}]]
 
|subheader2=[[AY Honors/{{#var:localCategory}}{{GetLangSuffix}}|{{Localize|{{#var:localCategory}}}}]]
 
|image={{#ifeq:{{#var:showNotAdventSrc}}|true|{{Superimpose
 
|image={{#ifeq:{{#var:showNotAdventSrc}}|true|{{Superimpose
Line 77: Line 77:
 
</div>}}
 
</div>}}
 
|col1_noDefaultStyle4=true
 
|col1_noDefaultStyle4=true
|col1_data4={{#ifeq:{{{state|{{GetHonorMetaData|language=/en|parameter=state}}}}}|piloting|<htmltag tagname="a" class="btn btn-accent" href="https://form.jotform.com/220234764665155?honorProposal={{#invoke:String|urlencode|{{#titleparts:{{PAGENAME}}|1|2}}}}" target="_blank">{{Localize|Give Feedback}}</htmltag>|}}
+
|col1_data4={{#ifeq:{{#var:honorstate}}|piloting|<htmltag tagname="a" class="btn btn-accent" href="https://form.jotform.com/220234764665155?honorProposal={{#invoke:String|urlencode|{{#titleparts:{{PAGENAME}}|1|2}}}}" target="_blank">{{Localize|Give Feedback}}</htmltag>|}}
 
|col1_class4=honor-infobox-button
 
|col1_class4=honor-infobox-button
 
|col1_noDefaultStyle5=true
 
|col1_noDefaultStyle5=true

Revision as of 05:30, 23 February 2022

This template creates an infobox for an honor.

Mechanics

The mechanics are just opaque magic (sorry).

Example

<div style="max-width: 300px">

{{Honor infobox
|honorlandingpage=AY Honors/Camping Skills IV
|skill=2
|year=2001
|category=Recreation
|authority=General Conference
|insignia=Camping_Skills_IV.png
|insignia_source=foo
|master1=Wilderness
}}

</div>


Camping Skills IV
Recreation
Skill Level
123
Approval authority
General Conference
Year of Introduction
2001
See also