Page MenuHomePhabricator

{{{{PAGENAME}}}} doesn't work
Open, Needs TriagePublic

Description

{{{{PAGENAME}}}} doesn't work.

  1. Have Template:X
  2. Go to page X or Help:X or in any other namespace
  3. add {{{{PAGENAME}}}} to the wikitext source

expected result: transcluded template:X
current result: {{{{PAGENAME}}}} displayed instead

Event Timeline

{{ {{PAGENAME}} }} seems to work. {{ {{PAGENAME}}}} and {{{{PAGENAME}} }} work too.

Same thing with {{{{FULLPAGENAME}}}}

And {{{{TALKPAGENAME}}}}

And not just magic words. Just created [[user:Base/test]] with "test", but {{{{User:Base/test}}}} is shown unparsed the same way.

Can someone please provide a hyperlink to a test page showing this behavior?

https://test.wikipedia.org/wiki/User:Base/T136515 (despite it being in my userspace feel free to modify)

{{ {{PAGENAME}} }} seems to work. {{ {{PAGENAME}}}} and {{{{PAGENAME}} }} work too.

IMO, the second method here is the right way to do this, and this isn't a bug but rather intentional behavior.

{{ {{PAGENAME}} }} seems to work. {{ {{PAGENAME}}}} and {{{{PAGENAME}} }} work too.

IMO, the second method here is the right way to do this, and this isn't a bug but rather intentional behavior.

Is that documented somewhere? :-/

{{{{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}