Difference between revisions of "Template:Honor index2"

From Pathfinder Wiki
 
(31 intermediate revisions by 2 users not shown)
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 -->
 +
{{#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:
|include={Honor desc{{{lang|}}}}:  honorname:reqpdf:insignia:category:authority:skill:          year:stage
+
|debug=0
|table=class="wikitable sortable",-,<noinclude><translate><!--T:1-->
+
|include={honor_landing}{{#var: selectedcolumns }}
</noinclude>Honor,Requirements,Patch,Category,Approval,Skill<br/>Level,Year,Stage<noinclude></translate></noinclude>
+
|table=class="wikitable sortable",-{{#var: tableheader }}
|tablerow=[[%PAGE%¦%%]],[[File:Gnome-mime-application-pdf.svg¦30px¦link=%%¦alt=Requirements]],[[File:%%¦30px¦center]],align="left"¦%%,align="center"¦²{division honor¦²{division abbrev¦%%}²}²,align="center"¦%%,align="center"¦%%,²{stage sort¦%%%}²
+
|tablerow={{#var: tablerow}}
|category={{{cat1|Adventist Youth Honors Answer Book/Primary}}}
+
|category={{#var:argIncCat}}
|category={{{cat2|}}}
+
|notcategory={{#if:{{{excat1|}}}|{{{excat1}}}{{GetLangSuffix}}}}
|category={{{cat3|}}}
+
|notcategory={{#if:{{{excat2|}}}|{{{excat2}}}{{GetLangSuffix}}}}
|category={{{cat4|}}}
+
|notcategory={{#if:{{{excat3|}}}|{{{excat3}}}{{GetLangSuffix}}}}
|category={{{cat5|}}}
+
|notcategory={{#if:{{{excat4|}}}|{{{excat4}}}{{GetLangSuffix}}}}
|notcategory={{{excat1|}}}
+
|notcategory={{#if:{{{excat5|}}}|{{{excat5}}}{{GetLangSuffix}}}}
|notcategory={{{excat2|}}}
 
|notcategory={{{excat3|}}}
 
|notcategory={{{excat4|}}}
 
|category=Adventist Youth Honors Answer Book/Honor Desc{{{lang|}}}
 
 
|nottitleregexp=.*/en$
 
|nottitleregexp=.*/en$
 
|ordermethod=sortkey
 
|ordermethod=sortkey
|namespace=0
+
|namespace=
|suppresserrors=true
 
 
}}
 
}}
 +
</includeonly>
 +
<noinclude><nowiki />{{Honor index2
 +
|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 index2
 +
|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
 +
}}
 +
[[Category:UsesLoops]]</noinclude>

Latest revision as of 00:22, 18 March 2021