Diferencia entre revisiones de «Plantilla:When on basepage»
De Familia Sanchez Arjona
(Creating this basepage/subpage/subsubpage detecting template.) |
m (11 revisiones importadas) |
||
(No se muestran 10 ediciones intermedias de 5 usuarios) | |||
Línea 1: | Línea 1: | ||
{{#switch: | {{#switch: | ||
− | <!--If no or empty " | + | <!--If no or empty "page" parameter then detect |
basepage/subpage/subsubpage--> | basepage/subpage/subsubpage--> | ||
− | {{#if:{{{ | + | {{#if:{{{page|}}} |
− | | {{ | + | | {{#if:{{#titleparts:{{{page}}}|0|3}} |
+ | | subsubpage <!--Subsubpage or lower--> | ||
+ | | {{#if:{{#titleparts:{{{page}}}|0|2}} | ||
+ | | subpage | ||
+ | | basepage | ||
+ | }} | ||
+ | }} | ||
| {{#if:{{#titleparts:{{FULLPAGENAME}}|0|3}} | | {{#if:{{#titleparts:{{FULLPAGENAME}}|0|3}} | ||
− | | subsubpage <!-- Subsubpage or lower | + | | subsubpage <!--Subsubpage or lower--> |
| {{#if:{{#titleparts:{{FULLPAGENAME}}|0|2}} | | {{#if:{{#titleparts:{{FULLPAGENAME}}|0|2}} | ||
| subpage | | subpage | ||
Línea 12: | Línea 18: | ||
}} | }} | ||
}} | }} | ||
− | | basepage = {{{1|}}} | + | |
− | | subpage | + | | basepage = {{{1|}}} |
− | | subsubpage = {{{3| {{{2|}}} }}} | + | | subpage = {{{2|}}} |
− | + | | subsubpage = {{{3| {{{2|}}} }}} <!--Respecting empty parameter on purpose--> | |
}}<!--End switch--><noinclude> | }}<!--End switch--><noinclude> | ||
− | + | {{Documentation}} | |
− | |||
− | |||
− | |||
</noinclude> | </noinclude> |
Revisión actual del 14:22 27 may 2016
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Please add categories to the /doc subpage. Subpages of this template. |