Difference between revisions of "Template:GetInsigniaThumb"

From Pathfinder Wiki
(add support for pilots)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
<includeonly>[[File:{{{1|No_Patch.png}}}|30px|center]]</includeonly><noinclude>
+
<includeonly>[[File:{{#if:{{{insignia|}}}|{{{insignia}}}|{{#if:{{{usePilotNoPatch|}}}|Pilot_No_Patch.png|No_Patch.png}}}}|30px|center]]</includeonly><noinclude>
 
Turns an insignia filename to <nowiki>[[</nowiki>File:''insignia''|30px|center]].  If the first argument is empty, it returns <nowiki>[[</nowiki>File:No_Patch.png|30px|center]].
 
Turns an insignia filename to <nowiki>[[</nowiki>File:''insignia''|30px|center]].  If the first argument is empty, it returns <nowiki>[[</nowiki>File:No_Patch.png|30px|center]].
 
----
 
----
 
<nowiki>{{GetInsigniaThumb}}</nowiki> -> {{GetInsigniaThumb}}
 
<nowiki>{{GetInsigniaThumb}}</nowiki> -> {{GetInsigniaThumb}}
  
<nowiki>{{GetInsigniaThumb|Smell_AY_Honour.png}}</nowiki> -> {{GetInsigniaThumb|Smell_AY_Honour.png}}
+
<nowiki>{{GetInsigniaThumb|insignia=}}</nowiki> -> {{GetInsigniaThumb|insignia=}}
 +
 
 +
<nowiki>{{GetInsigniaThumb|insignia=|usePilotNoPatch=true}}</nowiki> -> {{GetInsigniaThumb|insignia=|usePilotNoPatch=true}}
 +
 
 +
<nowiki>{{GetInsigniaThumb|insignia=Smell_AY_Honour.png}}</nowiki> -> {{GetInsigniaThumb|insignia=Smell_AY_Honour.png}}
  
 
</noinclude>
 
</noinclude>

Latest revision as of 16:20, 3 April 2022

Turns an insignia filename to [[File:insignia|30px|center]]. If the first argument is empty, it returns [[File:No_Patch.png|30px|center]].


{{GetInsigniaThumb}} ->

No Patch.png

{{GetInsigniaThumb|insignia=}} ->

No Patch.png

{{GetInsigniaThumb|insignia=|usePilotNoPatch=true}} ->

Pilot No Patch.png

{{GetInsigniaThumb|insignia=Smell_AY_Honour.png}} ->

Smell AY Honour.png