Template:Format link/doc
Jump to navigation
Jump to search
This is a documentation subpage for Template:Format link. It contains usage information, categories and other content that is not part of the original template page. |
This template uses Lua: |
This template formats a link for use in hatnote templates. It accepts two positional parameters, the link, and an optional display value. 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:
Examples
- Template:Tlc → [[Lion]] → Lion
- Template:Tlc → [[Lion#Etymology|Lion § Etymology]] → Lion § Etymology
- Template:Tlc → [[:Category:Lions]] → Category:Lions
- Template:Tlc → [[Lion#Etymology|Etymology of lion]] → Etymology of lion
- Template:Tlc → [[Quo warranto#Philippines|<i>Quo warranto</i> § Philippines]] → Template:Format hatnote link
- Template:Tlc → [[Cybercrime Prevention Act of 2012#Disini v. Secretary of Justice|Cybercrime Prevention Act of 2012 § <i>Disini v. Secretary of Justice</i>]] → Template:Format hatnote link
- Template:Tlc → Error: no link specified (help).
See also
- {{Format linkr}} – an arguably better version of this template which converts underscores to spaces and calls {{urldecode}} on the input
- {{Section link}}