Nick Jenkins wrote:
Hi All,
On http://meta.wikimedia.org/wiki/Help:Magic_words it lists all the various MediaWiki magic words.
I'm looking for something that can be used to give the talk page for the current page.
For example, in:
- The main namespace (namespace 0), it would return "Talk:{{PAGENAME}}".
- In the talk namespace ({{ns:1}}), it would return
"Talk:{{PAGENAME}}" (since the talk page for a talk page is the talk page itself).
- In the User namespace ({{ns:2}}), it would return "User_talk:{{PAGENAME}}".
- In the User talk namespace ({{ns:3}}), it would return
"User_talk:{{PAGENAME}}" (since the talk page for a user talk page is the user talk page itself).
- And so forth...
Does anyone know of a way of doing this? If not, can I maybe suggest a new magic word along these lines, such as "{{TALKPAGE}}", which would do this?
All the best, Nick.
http://en.wikipedia.org/wiki/Template:Talk currently just tacks a " talk" to the end of the namespace, but you could use the http://en.wikipedia.org/wiki/Template:Switch template to detect whether the current page is already a talk page and refrain from adding " talk" to the namespace.