Author: apb
Description:
Templates used in an article sometimes want to refer to the associated
talk page. Templates used om a talk page sometimes want to refer to the
associated non-talk page. It's impossible for template designers to do
this correctly without making unportable assumptions.
To refer to the talk page, a template could use something like [[Talk:
{{PAGENAME}}]], but that fails if the target should really have been
[[Wikipedia talk:{{PAGENAME}}]] or [[Template talk:Pagename]], etc. It
could use [[{{NAMESPACE}} talk:{{Pagename}}]], and this probably works
for all namespaces in the English wikipedia, but not in other languages.
To refer to the non-talk page from a talk page, a template could use
[[{{PAGENAME}}]], but this works only in the main namespace. See [[en:
Template:Todo]] and [[en:Template:WikipediaTodo]] for a pair of
templates that are identical except for having to work around this
problem.
New variables that allowed us to say [[{{NAMESPACE_TALK}}:{{PAGENAME}}]]
and [[NAMESPACE_NO_TALK}}:{{PAGENAME}}]] would be helpful, and should be
easy to implement. NAMESPACE_TALK would have to get the namespace as a
numeric value, then set least significant bit (via something like "$ns
= 1;"), and convert the result from a numeric to a string namespace. |
NAMESPACE_NO_TALK would be much the same, except it would clear the
least significant bit (via something like "$ns &= ~1;").
Version: unspecified
Severity: enhancement