Difference between revisions of "Template:NextRoman"

From Pathfinder Wiki
m (Jomegat moved page Template:NextRoman to Template:NextRoman: Better name)
Line 1: Line 1:
{{#regex:{{{1}}}|/(.+) (IV{{!}}V?I{0,3})$/|$1}} {{Proxima|{{#regex_var:2}}}}
+
<noinclude>
 +
If the link to the honor in '''{{{1}}}''' is an honor that ends with a roman numeral, and the next honor in the series exists, this template will return a link to that honor.  If the honor doesn't end with a roman numeral, or if the next honor in the series does not exist, it will return nothing.
 +
 
 +
*<nowiki>{{</nowiki>NextRoman|AY Honors/Camp Craft}} -> {{NextRoman|AY Honors/Camp Craft}}
 +
*<nowiki>{{</nowiki>NextRoman|AY Honors/Camping Skills I}} -> {{NextRoman|AY Honors/Camping Skills I}}
 +
*<nowiki>{{</nowiki>NextRoman|AY Honors/Camping Skills II}} -> {{NextRoman|AY Honors/Camping Skills II}}
 +
*<nowiki>{{</nowiki>NextRoman|AY Honors/Camping Skills III}} -> {{NextRoman|AY Honors/Camping Skills III}}
 +
*<nowiki>{{</nowiki>NextRoman|AY Honors/Camping Skills IV}} -> {{NextRoman|AY Honors/Camping Skills IV}}
 +
 
 +
</noinclude>{{#vardefine:lastword|{{#explode:{{{1}}}| |-1}}}}{{#vardefine:nextroman|{{#replace:{{{1}}}| {{#var:lastword}}| {{Proxima|{{#var:lastword}}}}}}}}{{#ifexist:{{#ifeq:{{{1}}}|{{#var:nextroman}}||{{#var:nextroman}}}}|[[{{#var:nextroman}}|{{#titleparts:{{#var:nextroman}}| |-1}}]]}}

Revision as of 04:33, 4 February 2021

If the link to the honor in {{{1}}} is an honor that ends with a roman numeral, and the next honor in the series exists, this template will return a link to that honor. If the honor doesn't end with a roman numeral, or if the next honor in the series does not exist, it will return nothing.

  • {{NextRoman|AY Honors/Camp Craft}} ->
  • {{NextRoman|AY Honors/Camping Skills I}} -> Camping Skills II
  • {{NextRoman|AY Honors/Camping Skills II}} -> Camping Skills III
  • {{NextRoman|AY Honors/Camping Skills III}} -> Camping Skills IV
  • {{NextRoman|AY Honors/Camping Skills IV}} ->