Difference between revisions of "Template:When pagename is"

From MINR.ORG WIKI
(Using the parameter pipe-trick instead of #ifeq, to detect defined parameters. Much more efficient, and shorter and clearer code. Then it needs the surrounding whitespace stripping.)
(Since the new code is so efficient: Adding 6 and 8 character partial matching, as in "/someth*" and "/somethin*".)
Line 12: Line 12:
 
           | <!--Check for match with "/some*"-->
 
           | <!--Check for match with "/some*"-->
 
             {{{ /{{lc: {{padleft:|4| {{#titleparts:{{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }}|0|-1}} }} }}*
 
             {{{ /{{lc: {{padleft:|4| {{#titleparts:{{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }}|0|-1}} }} }}*
             | {{{subpage| {{{other|}}} }}}  <!--Respecting empty parameter on purpose-->
+
             | <!--Check for match with "/someth*"-->
 +
              {{{ /{{lc: {{padleft:|6| {{#titleparts:{{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }}|0|-1}} }} }}*
 +
              | <!--Check for match with "/somethin*"-->
 +
                {{{ /{{lc: {{padleft:|8| {{#titleparts:{{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }}|0|-1}} }} }}*
 +
                | {{{subpage| {{{other|}}} }}}  <!--Respecting empty parameter on purpose-->
 +
                }}}
 +
              }}}
 
             }}}
 
             }}}
 
           }}}
 
           }}}

Revision as of 12:59, 6 November 2009


Template:Pp-template

Template documentation[create]