Template:Format link/doc

This template formats a link for use in hatnote templates. It accepts up to three positional parameters, the link, an optional display value, and an optional target override (which if provided, makes the link parameter optional). These parameters may also be supplied by name, as link, display , and target respectively. Links to categories and files are automatically escaped with the colon trick, and links to sections are automatically formatted as page § section, rather than the MediaWiki default of page#section.

This template doesn't work with subst.

Usage
Link only:

Link plus display:

Link with an italicized page name:

Link with an italicized section name:

If the link or display values contain an equals sign, you will need to specify the parameter names like this:

Link with a target override:

Link with parameters supplied by name:

Examples

 * → Lion →
 * → Lion §&amp;nbsp;Etymology →
 * → Category:Lions →
 * → Etymology of lion →
 * → §&amp;nbsp;Bar →
 * → Quo warranto §&amp;nbsp;Philippines →
 * &rarr; Cybercrime Prevention Act of 2012 §&amp;nbsp;Disini v. Secretary of Justice &rarr;

Errors
If this template is used and neither the link parameter (or positional parameter 1) nor the target parameter (or positional parameter 3) is supplied, then the template will return an error message. At least one of those must be supplied.