Board Thread:Support Requests - Getting Technical/@comment-27704998-20160509142553/@comment-26402117-20160518210223

Vengir wrote: Sorry, you are wrong on this one. It doesn't work the way you think and I would advise testing it yourself before making incorrect assumptions. PAGENAME magic word would display the name of the end page it is on, not the name of the page it was initially put on. This behaviour is much more useful. Is this about templates or pages, I'm getting strongly confused about where the magic word is getting placed. I am sure that templates with PAGENAME work as I described when substituted into pages. PAGENAME gives the name of whatever the current page is in the mainspace as you have said. Place a template in a template and PAGENAME in the parent gives the name of the child template - place the child template in a page and the PAGENAME within the template gives the name of the child template.

A navibox template. When PAGENAME is called on this template while it is in use on a page, that page will produce "Chapter navi" as the magic word output. That's what allows me, the One Piece Wiki and Wikipedia to actually put the base template to use in editing the child navibox, in this case the chapter one.

EDIT: I don't know much about wikitext - I only joined Wikia a year ago, and also am much stronger in hardware than software. I could be wrong, I could be right. But the code I forked has been proven to work as described above time and time again, giving us the same insight into this magic word.