"ഫലകം:When pagename is" എന്ന താളിന്റെ പതിപ്പുകൾ തമ്മിലുള്ള വ്യത്യാസം

(ചെ.) Protected Template:If pagename: Highly visible template: This is a meta-template, it will become high-risk when it is used. ([edit=sysop] (indefinite) [move=sysop] (indefinite))
Adding the "page" parameter. Adding {{pp-template}}.
വരി 1:
<!--Check for match with full pagename
-->{{#ifeq: {{{ {{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }}|x }}} | {{{ {{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }}| }}}
| {{{ {{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }} }}} <!--Has data, or is empty but defined-->
| <!--Else, are we on a subpage or a basepage?-->
{{#if:{{#titleparts:{{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }}|0|2}}
| <!--We are on a subpage, check for match with "User:Somepage/"-->
{{#ifeq: {{{ {{#titleparts:{{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }}|1|1}}/|x }}} | {{{ {{#titleparts:{{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }}|1|1}}/| }}}
| {{{ {{#titleparts:{{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }}|1|1}}/| }}}
| <!--Check for match with "Somepage/"-->
{{#ifeq: {{{ {{#titleparts:{{#if:{{{page|}}}| {{PAGENAME:{{{page|}}}}} | {{PAGENAME}} }}|1|1}}/|x }}} | {{{ {{#titleparts:{{#if:{{{page|}}}| {{PAGENAME:{{{page|}}}}} | {{PAGENAME}} }}|1|1}}/| }}}
| {{{ {{#titleparts:{{#if:{{{page|}}}| {{PAGENAME:{{{page|}}}}} | {{PAGENAME}} }}|1|1}}/| }}}
| <!--Check for match with "/something"-->
{{#ifeq: {{{ /{{#titleparts:{{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }}|0|2}}|x }}} | {{{ /{{#titleparts:{{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }}|0|2}}| }}}
| {{{ /{{#titleparts:{{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }}|0|2}}| }}} <!--Defined-->
| {{{subpage| {{{other|}}} }}} <!--Respecting empty parameter on purpose-->
}}
വരി 18:
}}
| <!--We are on a basepage, check for match with "Somepage"-->
{{#ifeq: {{{ {{#if:{{{page|}}}| {{PAGENAME:{{{page|}}}}} | {{PAGENAME}} }}|x }}} | {{{ {{#if:{{{page|}}}| {{PAGENAME:{{{page|}}}}} | {{PAGENAME}} }}| }}}
| {{{ {{#if:{{{page|}}}| {{PAGENAME:{{{page|}}}}} | {{PAGENAME}} }} }}} <!--Defined-->
| {{{basepage| {{{other|}}} }}} <!--Respecting empty parameter on purpose-->
}}
വരി 25:
}}<noinclude>
 
<!-- {{pp-template}} -->
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
"https://ml.wikipedia.org/wiki/ഫലകം:When_pagename_is" എന്ന താളിൽനിന്ന് ശേഖരിച്ചത്