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= |
|category=Arts, Crafts and Hobbies | |category=Arts, Crafts and Hobbies | ||
|authority=General Conference | |authority=General Conference | ||
Line 59: | Line 59: | ||
|- | |- | ||
| 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>{{{year|{{:Template:Translations/Unknown{{GetLangSuffix}} }} }}} | + | | 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 | ||
+ | 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 05:21, 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]] | |
[[File:Template:Translations/Not available at AdventSource|170px|link=|alt=|]] | |
Template:Translations/Skill Level 123 | |
Template:Translations/Approval authority Template:Translations/General Conference |
Template:Translations/Year of Introduction |
Part of
Artisan Master Award%|%[[AY Honors/Just For Test Master Award|]]%|% | |