Page MenuHomePhabricator

Add {{ORIGINALTEMPLATENAME}} magic word
Open, Needs TriagePublic

Description

Where it would be helpful

  1. On cswiki we suffer from large amount of basically the same templates, just differring in one word - the template name - see: https://cs.wikipedia.org/wiki/Speci%C3%A1ln%C3%AD:Porovn%C3%A1n%C3%AD_str%C3%A1nek?page1=%C5%A0ablona%3Akter%C3%A1%3F&rev1=&page2=%C5%A0ablona%3AKter%C3%BD%3F&rev2=&action=&diffonly=&unhide=&diffmode=source
  2. On cswiki we also suffer from large amount of soft redirects between templates, because the differ just in a way of filling parameters, but produce the same code, see: https://cs.wikipedia.org/wiki/Speci%C3%A1ln%C3%AD:Porovn%C3%A1n%C3%AD_str%C3%A1nek?page1=%C5%A0ablona%3ACol-begin&rev1=&page2=%C5%A0ablona%3ASloupce-za%C4%8D%C3%A1tek&rev2=&action=&diffonly=&unhide=&diffmode=source

These two usecases would be so easy to solve by getting a ORIGINALTEMPLATENAME - the version before redirect happens:

Template:Foo is a redirect to Template:Bar

{{Foo}} shows the contents of {{Bar}}

Only {{ORIGINALTEMPLATENAME}} for {{Foo}} would show Foo, for Bar would show Bar, even if one is the redirect to another.