Topic on Project:Village Pump

TALKPAGENAME: how to code access to the talk page of the root article when called from a translated subpage

3
Summary by Wladek92

done; thanks Jesus.

Wladek92 (talkcontribs)

Hi all, my problem today is that on translated FR subpage => https://www.mediawiki.org/wiki/SELinux/fr#Pygments_for_SyntaxHighlight we have an access to {{TALKPAGENAME}}. Although it is meaningful in the root page (topic is on its own talk page) it becomes meaningless on the translated page where it accesses direcly the talk page of the translated subpage => https://www.mediawiki.org/wiki/Talk:SELinux/fr and of course the topic is not found since this talk page is today empty. So my question is: how to force the access to the talk page of the root article (dynamically if possible and avoiding a hardcoded link)) when called from a translated subpage ? something like {{TALKPAGENAME|BASEPAGENAME}} but unhappily this is not a template. Thanks.

Christian Wia (talk) 14:17, 4 September 2019 (UTC)

Ciencia Al Poder (talkcontribs)

Done with {{TALKPAGENAME:{{BASEPAGENAME}}}}

BASEPAGENAME gets the page without the subpage, and then use it as parameter to TALKPAGENAME to tell it to get it's talk page instead of the current talk page. In magic words, the first parameter is separated with a colon from the magic word itself, and not with a pipe.

Wladek92 (talkcontribs)

Marvellous ! it works.