Difference between revisions of "Template:When pagename is"
From MINR.ORG WIKI
(Fixed so "/something" also matches "User:Example/test/something" and "User:Example/test/test/something".) |
(Adding matching with " /some* ".) |
||
Line 10: | Line 10: | ||
{{#ifeq: {{{ {{#titleparts:{{#if:{{{page|}}}| {{PAGENAME:{{{page|}}}}} | {{PAGENAME}} }}|1|1}}/|x }}} | {{{ {{#titleparts:{{#if:{{{page|}}}| {{PAGENAME:{{{page|}}}}} | {{PAGENAME}} }}|1|1}}/| }}} | {{#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}}/| }}} | | {{{ {{#titleparts:{{#if:{{{page|}}}| {{PAGENAME:{{{page|}}}}} | {{PAGENAME}} }}|1|1}}/| }}} | ||
− | | <!--Check for match with "/something"--> | + | | <!--Check for match with "/some*"--> |
+ | {{#ifeq: {{{ /{{padleft:|4| {{lc: {{#titleparts:{{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }}|0|-1}} }} }}*|x }}} | {{{ /{{padleft:|4| {{lc: {{#titleparts:{{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }}|0|-1}} }} }}*| }}} | ||
+ | | {{{ /{{padleft:|4| {{lc: {{#titleparts:{{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }}|0|-1}} }} }}*| }}} <!--"/some*"--> | ||
+ | | <!--Check for match with "/something"--> | ||
{{#ifeq: {{{ /{{#titleparts:{{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }}|0|-1}}|x }}} | {{{ /{{#titleparts:{{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }}|0|-1}}| }}} | {{#ifeq: {{{ /{{#titleparts:{{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }}|0|-1}}|x }}} | {{{ /{{#titleparts:{{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }}|0|-1}}| }}} | ||
− | + | | {{{ /{{#titleparts:{{#if:{{{page|}}}| {{{page|}}} | {{FULLPAGENAME}} }}|0|-1}}| }}} <!--Defined--> | |
− | + | | {{{subpage| {{{other|}}} }}} <!--Respecting empty parameter on purpose--> | |
+ | }} | ||
}} | }} | ||
}} | }} |