Template:ListingFields/doc

I don't fully understand how this works, lol! So I'm pretty much only documenting the parts that I made.

Normally, an automatically generated list looks like this:

{{#ask: [[Category:Functions]] [[parent::love.audio (Português)]] [[Concept:Current]]
| headers=hide
| format=template
| template=ListingFields
| introtemplate=ListingIntro
| outrotemplate=ListingOutro
| ?Description
| ?PrettySince
| ?PrettyRemoved
}}

You can see similar ones all over the wiki.

It works fine for the English wiki, but not so much for the translated ones, because if an English page name is "pagename", the Portuguese one is "pagename (Português). Now imagine that each big page has 20 links, all with (Português) appended to it. It's an annoyance. Now another situation: "number" in Portuguese is "número", but the link to the page is "number (Português). Not a big problem, but it can be better.

So I added the possibility of having two extra arguments:

{{#ask: [[Category:Functions]] [[parent::love.audio (Português)]] [[Concept:Current]]
| headers=hide
| format=template
| template=ListingFields
| introtemplate=ListingIntro
| outrotemplate=ListingOutro
| ?Description
| ?PrettySince
| ?PrettyRemoved
| ?RealLink# -
| ?DisplayName# -
}}

If it finds a page with RealLink and DisplayName set, it displays the DisplayName instead. Here's an example of how it can be set:

{{#set:RealLink=number (Português)}}
{{#set:DisplayName=número}}

Just put that anywhere on the page!