Difference between revisions of "Template:Honor index"
From Pathfinder Wiki
DesignerThan (talk | contribs) |
|||
Line 1: | Line 1: | ||
− | <!--- ¦ ---> | + | <!--- ¦ ---><includeonly> |
− | < | + | <!-- assamble the tablerow argument of DPL so it is customizeable --> |
+ | <!-- initialize the variables --> | ||
+ | {{#vardefine: selectedcolumns | }}{{#vardefine: selectedcolumns | {{#if: {{{columnselection|}}} | {{{columnselection}}} | :honorname:insignia:category:authority:skill:year }} }}{{#vardefine: tablerow | }}{{#vardefine: tableheader | }} | ||
+ | {{#vardefine: i | 1 }}{{#while: <!-- we need to start at word 1 because of the leeding : --> | ||
+ | | {{#if: {{#explode:{{#var: selectedcolumns }}|:|{{#var: i }}}} | true }} | ||
+ | | {{#vardefine: tablerow | {{#var: tablerow}}{{#switch: {{#explode:{{#var: selectedcolumns }}|:|{{#var: i }}}} | honorname = [[%PAGE%¦%%]], | insignia = [[File:%%¦30px¦center]], | category = align="left"¦²{Localize¦%%}², | authority = align="center"¦²{division honor¦²{division abbrev¦%%}²}², | skill = align="center"¦%%, | year = align="center"¦%%, }} }} | ||
+ | {{#vardefine: tableheader | {{#var: tableheader}}{{#switch: {{#explode:{{#var: selectedcolumns }}|:|{{#var: i }}}} | honorname = ,{{Localize|Honor}} | insignia = ,{{Localize|Patch}} | category = ,{{Localize|Category}} | authority = ,{{Localize|Approval}} | skill = ,{{Localize|Skill Level}} | year = ,{{Localize|Year}} }} }}{{#vardefine: i | {{#expr: {{#var: i }} + 1 }} }} }}<nowiki /> | ||
<!-- that loop's through all argument's with the prefix cat and saves it into a variable --> | <!-- that loop's through all argument's with the prefix cat and saves it into a variable --> | ||
{{#vardefine:argIncCat|AY Honors/Honor landing{{GetLangSuffix}}&AY Honors/Primary}}{{#forargs: cat | key | category |<nowiki />{{#vardefine: argIncCat |{{#var:argIncCat}}{{#if:{{#var:category}}|&{{#var:category}}{{GetLangSuffix}} }} }} }} | {{#vardefine:argIncCat|AY Honors/Honor landing{{GetLangSuffix}}&AY Honors/Primary}}{{#forargs: cat | key | category |<nowiki />{{#vardefine: argIncCat |{{#var:argIncCat}}{{#if:{{#var:category}}|&{{#var:category}}{{GetLangSuffix}} }} }} }} | ||
{{#dpl: | {{#dpl: | ||
|debug=0 | |debug=0 | ||
− | |include={honor_landing}: | + | |include={honor_landing}{{#var: selectedcolumns }} |
− | |table=class="wikitable sortable",- | + | |table=class="wikitable sortable",-{{#var: tableheader }} |
− | |tablerow= | + | |tablerow={{#var: tablerow}} |
|category={{#var:argIncCat}} | |category={{#var:argIncCat}} | ||
|notcategory={{#if:{{{excat1|}}}|{{{excat1}}}{{GetLangSuffix}}}} | |notcategory={{#if:{{{excat1|}}}|{{{excat1}}}{{GetLangSuffix}}}} | ||
Line 20: | Line 26: | ||
</includeonly> | </includeonly> | ||
<noinclude><nowiki />{{Honor index | <noinclude><nowiki />{{Honor index | ||
+ | |cat1=AY Honors/Arts, Crafts and Hobbies | ||
+ | |cat2=AY Honors/Skill Level 1 | ||
+ | |excat1=AY Honors/Approved by General Conference | ||
+ | |excat2=AY Honors/Approved by North American Division | ||
+ | |columnselection=:honorname:insignia:authority:skill:year | ||
+ | }}<nowiki />{{Honor index | ||
|cat1=AY Honors/Arts, Crafts and Hobbies | |cat1=AY Honors/Arts, Crafts and Hobbies | ||
|cat2=AY Honors/Skill Level 1 | |cat2=AY Honors/Skill Level 1 |
Revision as of 02:24, 25 February 2021