Difference between revisions of "Template:If pagename"
From Geohashing
(Adding the "page" parameter. Adding {{pp-template}}.) |
(Fixed so "/something" also matches "User:Example/test/something" and "User:Example/test/test/something".) |
||
Line 11: | Line 11: | ||
| {{{ {{#titleparts:{{#if:{{{page|}}}| {{PAGENAME:{{{page|}}}}} | {{PAGENAME}} }}|1|1}}/| }}} | | {{{ {{#titleparts:{{#if:{{{page|}}}| {{PAGENAME:{{{page|}}}}} | {{PAGENAME}} }}|1|1}}/| }}} | ||
| <!--Check for match with "/something"--> | | <!--Check for match with "/something"--> | ||
− | {{#ifeq: {{{ /{{#titleparts:{{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }}|0| | + | {{#ifeq: {{{ /{{#titleparts:{{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }}|0|-1}}|x }}} | {{{ /{{#titleparts:{{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }}|0|-1}}| }}} |
− | | {{{ /{{#titleparts:{{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }}|0| | + | | {{{ /{{#titleparts:{{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }}|0|-1}}| }}} <!--Defined--> |
| {{{subpage| {{{other|}}} }}} <!--Respecting empty parameter on purpose--> | | {{{subpage| {{{other|}}} }}} <!--Respecting empty parameter on purpose--> | ||
}} | }} |