Difference between revisions of "Template:Reqreq"

From Pathfinder Wiki
(Created page with "'''{{{2}}}. {{{1}}}'''")
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
'''{{{2}}}. {{{1}}}'''
+
<noinclude>
 +
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:
 +
<nowiki>{{reqreq|page=Adventist Youth Honors Answer Book/Nature/Amphibians|num=11a}}</nowiki><br />
 +
shows requirement 11a of the Amphibians honor, displayed as below:
 +
 
 +
{{reqreq|page=Adventist Youth Honors Answer Book/Nature/Amphibians|num=11a}}
 +
 
 +
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 <nowiki><section begin=''identifier''></nowiki> and <nowiki><section end=''identifier''></nowiki>, with the requirement placed between the two tags.
 +
 
 +
</noinclude>{{#if:{{{dispreq|}}}|{{{dispreq}}}|{{{num}}}.}} {{#lst:{{#titleparts:{{{page}}}|3|1}}/Requirements{{#switch:{{SUBPAGENAME}}|es=/es|fr=/fr}}|req{{{num}}}}}<noinclude>[[Category:Requirements Template]]</noinclude>

Revision as of 21:22, 29 November 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:

11a. Observe a toad in your yard or neighborhood to find out.
(1) Where and when it sleeps,
(2) When it leaves its home for food,
(3) How fast it can travel,
(4) How far it can jump, and as many other interesting things as you can find out about it, and write an essay covering the details requested in the first section of this question.


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}}}.