{{{{PAGENAME}}}} doesn't work.
- Have Template:X
- Go to page X or Help:X or in any other namespace
- add {{{{PAGENAME}}}} to the wikitext source
expected result: transcluded template:X
current result: {{{{PAGENAME}}}} displayed instead
| Danny_B | |
| May 29 2016, 12:16 PM |
| F71523794: image.png | |
| Wed, Jan 14, 4:19 AM |
| F71523786: image.png | |
| Wed, Jan 14, 4:18 AM |
{{{{PAGENAME}}}} doesn't work.
expected result: transcluded template:X
current result: {{{{PAGENAME}}}} displayed instead
And not just magic words. Just created [[user:Base/test]] with "test", but {{{{User:Base/test}}}} is shown unparsed the same way.
https://test.wikipedia.org/wiki/User:Base/T136515 (despite it being in my userspace feel free to modify)
IMO, the second method here is the right way to do this, and this isn't a bug but rather intentional behavior.
{{{{PAGENAME}}}} is interpreted as a named parameter {{{PAGENAME}}} inside single curly brackets.
On https://en.wikipedia.org/wiki/Template:X1 I previewed this:
{{{{PAGENAME}}}}
<noinclude>Transclusion: {{X1|PAGENAME=test}}</noinclude>
Result:
{{{{PAGENAME}}}}
Transclusion: {test}
Why would you need this to work?
It's your job as the editor to write wikitext that MediaWiki can parse properly. Also the following works if you really want this sort of thing:
{{<nowiki></nowiki>{{PAGENAME}}<nowiki><nowiki>}}If you want the template, instead you can use a null comment:
{{<!-- null-->{{PAGENAME}}<!-- null-->}}