Difference between revisions of "Template:Honor index2"

From Pathfinder Wiki
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<!--- ¦ --->
+
<!--- ¦ ---><includeonly>
<includeonly>
 
 
<!-- assamble the tablerow argument of DPL so it is customizeable -->
 
<!-- assamble the tablerow argument of DPL so it is customizeable -->
<!-- :honorname:insignia:category:authority:skill:year -->
 
 
<!-- initialize the variables -->
 
<!-- initialize the variables -->
{{#vardefine: selectedcolumns | }}
+
{{#vardefine: selectedcolumns | }}{{#vardefine: selectedcolumns | {{#if: {{{columnselection|}}} | {{{columnselection}}} | :honorname:insignia:category:authority:skill:year }} }}{{#vardefine: tablerow | }}{{#vardefine: tableheader | }}
{{#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 : -->
 
{{#vardefine: i | 1 }}{{#while: <!-- we need to start at word 1 because of the leeding : -->
 
  | {{#if: {{#explode:{{#var: selectedcolumns }}|:|{{#var: i }}}} | true }}
 
  | {{#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: 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: 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 />
{{#vardefine: i | {{#expr: {{#var: i }} + 1 }} }} }}
 
 
<!-- 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}} }} }} }}
Line 37: Line 31:
 
|excat2=AY Honors/Approved by North American Division
 
|excat2=AY Honors/Approved by North American Division
 
|columnselection=:honorname:insignia:authority:skill:year
 
|columnselection=:honorname:insignia:authority:skill:year
}}{{Honor index2
+
}}<nowiki />{{Honor index2
 
|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
Line 43: Line 37:
 
|excat2=AY Honors/Approved by North American Division
 
|excat2=AY Honors/Approved by North American Division
 
}}
 
}}
</noinclude>
+
[[Category:UsesLoops]]</noinclude>

Latest revision as of 00:22, 18 March 2021