Шаблон:SUBPAGENAME
Версія від 14:24, 4 жовтня 2021, створена Regionet (обговорення | внесок) (Створена сторінка: {{#explode:{{#titleparts:{{PAGENAME}}}}|/|-1}}<noinclude>{{Documentation}}</noinclude>)
{{#explode:SUBPAGENAME|/|-1}}
[Редагувати] [10px⧼purge-purge⧽] 50px Template documentation
This documentation is transcluded from Шаблон:SUBPAGENAME/doc. (Редагувати | history)
Note to editors: Please don't categorize this template by editing it directly. Instead, place the category in its documentation page, in its "includeonly" section.
Note to editors: Please don't categorize this template by editing it directly. Instead, place the category in its documentation page, in its "includeonly" section.
Usage[ред.]
The builtin template {{SUBPAGENAME}}
does not work on this wiki for all namespaces (and notably not in the "Template:" namespace where it is needed to manage "/doc" and "/sandbox" subpages).
This is a workaround that you can call using {{Template:SUBPAGENAME}}
instead.
Also, unlike the builtin template, it will de-HTML-ize its return value (e.g. apostrophes and a few other ASCII punctuations accepted in page titles).
In the documentation subpage Template:SUBPAGENAME/doc it should return "doc".
It works using MediaWiki Extension:StringFunctions which is enabled on this wiki.