Forum:About templates linking to talk pages

From Uncyclopedia, the content-free encyclopedia.
Jump to: navigation, search
Forums: Index > Village Dump > About templates linking to talk pages
Note: This topic has been unedited for 4644 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.

I noticed that templates like {{POV}} use [[:{{NAMESPACE}} talk:{{PAGENAME}}|talk page]] to link to the article's talk page, which doesn't work correctly if the template is itself placed on a talk page (see User talk:Pentium5dot1/Sandbox).

The correct solution AFAIK is [[:{{TALKSPACE}}:{{PAGENAME}}|talk page]], which creates a self-referential link instead of trying to link to "Talk talk:..." or something similar. (Admittedly, self-referential "links" are bad too, but my way avoids the creation of unnecessary red links that encourage the creation of garbage pages.)

I am going to go ahead and fix this myself on {{POV}}, but anybody want to go around helping with this on all the other templates? Pentium5dot1 04:36, 3 February 2007 (UTC)

Okay, I also went ahead and fixed {{disputed}}, {{theydisputed}} and {{TotallyDisputed}}. BTW, I'm not sure whether that colon at the beginning of the link target is really necessary (it was there originally in {{disputed}} and {{theydisputed}} but not in {{TotallyDisputed}}; can a MediaWiki expert explain more?) Pentium5dot1 04:47, 3 February 2007 (UTC)
A colon at the start of a normal wikilink like [[:...]] ensures that it is just a link and not, say, a category or interwiki link. At the start of a template link like {{:...}} it tell it to use the main namespace for the template, as opposed to the template namespace. And {{TALKSPACE}}:{{PAGENAME}} is better, but {{TALKPAGENAME}} is best. And no, a colon isn't needed. Spang talk 05:00, 3 Feb 2007

Sorry, I didn't know of the existence of {{TALKPAGENAME}}. I hope you aren't too mad at me for this, but thank you for helping me to further my knowledge of MediaWiki. I will go re-fix the aforementioned templates ASAP. Pentium5dot1 00:04, 4 February 2007 (UTC)

Mad? Nah, you're helping make the place that little bit better. Always a good thing! Spang talk 00:12, 4 Feb 2007