(allowing an optional parameter 2 to replace Template:WP p; defaults to 1 if absent) |
(changing documentation) |
||
Line 14: | Line 14: | ||
:{{WP|Jock Brandis}} developed the {{WP|Malian peanut sheller}}. | :{{WP|Jock Brandis}} developed the {{WP|Malian peanut sheller}}. | ||
==Changing the display text | ==Changing the display text== | ||
If the Wikipedia article title is '''Peter Newman (Australian)''' but you want it to display as {{WP p|Peter Newman (Australian)|Newman P}}, then use the {{ | If the Wikipedia article title is '''Peter Newman (Australian)''' but you want it to display as {{WP p|Peter Newman (Australian)|Newman P}}, then use the optional second parameter: <nowiki>{{WP|Peter Newman (Australian)|Newman P}}</nowiki> will display as {{WP|Peter Newman (Australian)|Newman P}}. [[Template:WP p]] is deprecated in favor of using the optional second parameter in this template. | ||
== Bug(s) == | == Bug(s) == | ||
*Unlike normal wiki linking, you cannot add letters at the end of the word, e.g. to make it plural. E.g. normally '''<nowiki>[[Blog]]s</nowiki>''' creates '''[[Blog]]s''', but '''<nowiki>{{WP|Blog}}s</nowiki>''' creates '''{{WP|Blog}}s''' i.e. a mess. | *Unlike normal wiki linking, you cannot add letters at the end of the word, e.g. to make it plural. E.g. normally '''<nowiki>[[Blog]]s</nowiki>''' creates '''[[Blog]]s''', but '''<nowiki>{{WP|Blog}}s</nowiki>''' creates '''{{WP|Blog}}s''' i.e. a mess. Use the second parameter if you want the word to display differently than in the link. | ||
*Currently doesn't allow piping (but it should be doable to create another template to do this). | *Currently doesn't allow piping (but it should be doable to create another template to do this). | ||
Revision as of 17:19, 22 August 2008
- Note: The {{wp sup}} template is arguably better for this purpose as it avoids some problems with linking to articles with names different to the displayed text ("WP" doesn't allow piping); and it also fits in better with punctuation, e.g. it can go after a comma or period. Should we deprecate WP? Move "wp sup" to "wp"/"WP" and update all the old uses of "WP" to the new format?
{{{1}}}[[Wikipedia:{{{1}}}|WP]]
Usage
Use this template to link text to Wikipedia, in a more elegant way than using the wikipedia: prefix.
It works in a similar way to a piped wikilink.
E.g.:
- {{WP|Jock Brandis}} developed the {{WP|Malian peanut sheller}}.
creates:
Changing the display text
If the Wikipedia article title is Peter Newman (Australian) but you want it to display as W, then use the optional second parameter: {{WP|Peter Newman (Australian)|Newman P}} will display as Newman PWP. Template:WP p is deprecated in favor of using the optional second parameter in this template.
Bug(s)
- Unlike normal wiki linking, you cannot add letters at the end of the word, e.g. to make it plural. E.g. normally [[Blog]]s creates Blogs, but {{WP|Blog}}s creates BlogWPs i.e. a mess. Use the second parameter if you want the word to display differently than in the link.
- Currently doesn't allow piping (but it should be doable to create another template to do this).
Unresolved questions
- should we use <tt> (teletype text?) to subtly mark the link text (making it clear whether it's the last word that's linked, or the last 2 or more words)?
- should we use <small> for the "WP"? E.g. "Jock Brandis (WP) developed..." If so, it seems a bit too small for some readers perhaps, and thus confusing; if left as normal size it's a little intrusive perhaps, but quite clear.