Difference between pages "Template:Get regnum()" and "Template:Get regnum()/sandbox"

From quasar
(Difference between pages)
Page 1
Page 2
m (1 revision)
 
m (1 revision)
 
Line 1: Line 1:
<includeonly><!-- each line returns a null string UNLESS it's a regnum. Since only one level will be a regnum, the final output will be the name of that regnum.
+
<includeonly><!-- THIS IS /2
                 -->{{is reg()|{{{1}}}  }}<!--
+
                 -->{{is reg|{{{1}}}  }}<!--
         -->{{is reg()|{{t^|{{{1}}} }} }}<!--
+
         -->{{is reg|{{t^|{{{1}}} }} }}<!--
         -->{{is reg()|{{t^^|{{{1}}} }} }}<!--
+
         -->{{is reg|{{t^^|{{{1}}} }} }}<!--
-->{{is reg()|{{t^|{{t^^|{{{1}}} }} }} }}<!--
+
        -->{{is reg|{{t^3|{{{1}}} }} }}<!--
                -->{{is reg()|{{t^4|{{{1}}} }} }}<!--
+
        -->{{is reg|{{t^4|{{{1}}} }} }}<!--
        -->{{is reg()|{{t^4|{{t^|{{{1}}} }} }} }}<!--
+
        -->{{is reg|{{t^5|{{{1}}} }} }}<!--
         -->{{is reg()|{{t^4|{{t^^|{{{1}}} }} }} }}<!--
+
         -->{{is reg|{{t^6|{{{1}}} }} }}<!--
-->{{is reg()|{{t^4|{{t^^|{{t^|{{{1}}} }} }} }} }}<!--
+
        -->{{is reg|{{t^7|{{{1}}} }} }}<!--
                -->{{is reg()|{{t^4|{{t^4|{{{1}}} }} }} }}<!--
+
        -->{{is reg|{{t^8|{{{1}}} }} }}<!--
        -->{{is reg()|{{t^4|{{t^4|{{t^|{{{1}}} }} }} }} }}<!--
+
        -->{{is reg|{{t^9|{{{1}}} }} }}<!--
         -->{{is reg()|{{t^4|{{t^4|{{t^^|{{{1}}} }} }} }} }}<!--
+
         -->{{is reg|{{t^10|{{{1}}} }} }}<!--
-->{{is reg()|{{t^4|{{t^4|{{t^^|{{t^|{{{1}}} }} }} }} }} }}<!--
+
        -->{{is reg|{{t^11|{{{1}}} }} }}<!--
                -->{{is reg()|{{t^4|{{t^4|{{t^4|{{{1}}} }} }} }} }}<!--
+
        -->{{is reg|{{t^12|{{{1}}} }} }}<!--
        -->{{is reg()|{{t^4|{{t^4|{{t^4|{{t^|{{{1}}} }} }} }} }} }}<!--
+
         -->{{is reg|{{t^13|{{{1}}} }} }}<!--
         -->{{is reg()|{{t^4|{{t^4|{{t^4|{{t^^|{{{1}}} }} }} }} }} }}<!--
+
-->{{#if:{{t^14|{{{1}}} }}|{{get regnum()/3|{{t^14|{{{1}}} }} }} }}<!--
-->{{is reg()|{{t^4|{{t^4|{{t^4|{{t^^|{{t^|{{{1}}} }} }} }} }} }} }}<!--
+
--></includeonly><noinclude>{{documentation|Template:Get regnum/doc}}</noinclude>
                -->{{is reg()|{{t^16|{{{1}}} }} }}<!--
+
We can't continue this game indefinitely; there's a 40-deep limit on nested templates.
+
We can avoid this by sneakily calling copies of this template:
+
(We can't call the template itself; that'd create a loop.)
+
Whilst we could squeeze a couple more rows in this template, we want to allow it to be used within other templates, so it's worth leaving some wriggle room.
+
-->{{get regnum()/1|{{t^16|{{t^|{{{1}}} }} }} }}<!--
+
This template itself calls a deeper copy, so we can search for a regnum up to sixty levels above the input taxon.
+
--></includeonly><noinclude>{{documentation}}</noinclude>
+