Difference between revisions of "Template:Honor infobox"

From Pathfinder Wiki
Line 21: Line 21:
 
|honorname=Aboriginal Lore
 
|honorname=Aboriginal Lore
 
|skill=1
 
|skill=1
|year=
+
|year=2001
 
|category=Arts, Crafts and Hobbies
 
|category=Arts, Crafts and Hobbies
 
|authority=General Conference
 
|authority=General Conference
Line 60: Line 60:
 
| class="infobox-value text-light bg-secondary" | <span class="infobox-value-emphasize">{{:Template:Translations/Approval authority{{GetLangSuffix}}}}</span><br>{{:Template:Translations/{{{authority|Unknown}}}{{GetLangSuffix}}}}
 
| class="infobox-value text-light bg-secondary" | <span class="infobox-value-emphasize">{{:Template:Translations/Approval authority{{GetLangSuffix}}}}</span><br>{{:Template:Translations/{{{authority|Unknown}}}{{GetLangSuffix}}}}
 
| class="infobox-value text-light bg-secondary" | <span class="infobox-value-emphasize">{{:Template:Translations/Year of Introduction{{GetLangSuffix}}}}</span><br>
 
| class="infobox-value text-light bg-secondary" | <span class="infobox-value-emphasize">{{:Template:Translations/Year of Introduction{{GetLangSuffix}}}}</span><br>
<!-- If we can't add 1 to {{{year}}} it's either not defined, or it's not a number.  So we will fetch
+
{{#iferror:{{#expr:1+{{{year|X}}} }}|{{:Template:Translations/Unknown{{GetLangSuffix}}}}|{{{year}}} }}
    the localized "Unknown" word.  Otherwise, it is a number so we can just output the number. -->
 
{{#iferror:{{#expr:{{{year}}}+1}}|{{:Template:Translations/Unknown{{GetLangSuffix}}}}|{{{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">Part of</span>
 
{{!}}colspan="2" id="infobox-part-of" class="infobox-value text-light bg-secondary"  {{!}}<span class="infobox-value-emphasize">Part of</span>

Revision as of 04:30, 19 January 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
[[AY Honors/Arts, Crafts and Hobbies|Template:Translations/Arts, Crafts and Hobbies]]
Template:Translations/Skill Level
123
Template:Translations/Approval authority
Template:Translations/General Conference
Template:Translations/Year of Introduction

2001

Part of

Artisan Master Award%|%[[AY Honors/Just For Test Master Award|]]%|%