Template documentation


This template returns the last non-language-tag subpage name.

On normal and translatable pages (base pages where the Translate extension is activated) it returns the magic word {{SUBPAGENAME}}, but it returns the second last subpage name on translated pages (which results in being the same name on translatable and translated pages).


  • On "Example/Page" it will return "Page"
  • On "Example/Page/fi" it will return "Page"


There could be false positives if some last-subpage-parts appear to be language codes, so you should be relatively confident about the expected page names.

  • On "Example/Page/bar" it will return "Page" because bar is the language code for Bavarian.
  • On "Example/Page/doc" it will return "doc", but it could (and perhaps should) return "Page" in the future because doc is the language code for Northern Dong.