Template:Target
From QED
Contents |
Syntax
{{target|HREF|TEXT|TARGET}}
or: {{target|1=HREF|2=TEXT|3=TARGET}}
This template is intended to make it easy to create a link that will open in a new tab or window while providing a visual clue that the link is special.
In all cases, a special icon is used to indicate the link is special.
All arguments are optional:
- HREF defaults to the null string.
- TEXT defaults to HREF
- TARGET defaults to _blank
The template expands to <a href=HREF target="TARGET">TEXT</a>
Handling "=" and "|"
Care must be taken if any of the parameters contain "=" or "|" since these characters are syntactic markers in templates.
One way to handle "=" is to use the second syntactic form, that is, to specify the parameter numbers explicitly, e.g. {{target|1=http://www.abc.com?x=y|2=x=y}}.
Occurrences of "=" can also be replaced by {{eq}}; in HREF, they can also be replaced by %3D.
Occurrences of "|" can be replaced by {{!}}; in HREF, they can also be replaced by %7C.
Examples
{{target|http://www.princeton.edu}} produces http://www.princeton.edu
{{target|http://www.princeton.edu|Princeton University}} produces Princeton University
{{target|{{fullurl:Main_Page}}|QED }} produces QED
{{target|1=http://www.abc.com?x=y|2=x=y}} produces
x=y.
See also
- Template:)) — handling }}












