Template:Format link/doc

From Vanatas

Template:Lua

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[edit source]

Link only:

Template:Tlc

Link plus display:

Template:Tlc

Link with an italicized page name:

Template:Tlc

Link with an italicized section name:

Template:Tlc

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

Template:Tlc

Link with a target override:

Template:Tlc

Link with parameters supplied by name:

Template:Tlc

Examples[edit source]

Errors[edit source]

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.

See also[edit source]