Difference between revisions of "Template:Reqreq"

From Pathfinder Wiki
Line 11: Line 11:
  
 
[[Category:Requirements Template]]
 
[[Category:Requirements Template]]
</noinclude>{{#if:{{{dispreq|}}}|{{{dispreq}}}|{{{num}}}.}} {{#lst:{{#titleparts:{{{page}}}|2|1}}/Requirements{{#switch:{{SUBPAGENAME}}|es=/es|fr=/fr}}
+
</noinclude>{{#if:{{{dispreq|}}}|{{{dispreq}}}|{{{num}}}.}} {{#lst:{{#titleparts:{{{page}}}|2|1}}/Requirements{{#switch:{{SUBPAGENAME}}|es=/es|fr=/fr|de=/de}}
 
|req{{{num}}}
 
|req{{{num}}}
 
}}
 
}}

Revision as of 03:43, 8 December 2020

This template extracts requirement num from page page and displays it in a way that is useful when you just want the requirement without any formatting.

Example: {{reqreq|page=Adventist Youth Honors Answer Book/Nature/Amphibians|num=11a}}
shows requirement 11a of the Amphibians honor, displayed as below:

1. Who are the Aborigines and where did they come from? How many tribes were there when European colonization commenced?


This uses the #lst: parser directive which takes two arguments: a page, and a section identifier. The page it references must have section tags with <section begin=''identifier''> and <section end=''identifier''>, with the requirement placed between the two tags. {{{num}}}.