Category:Utility Templates
Resources » Wiki Resources » Templates » Utility Templates
These templates provide shorthand for producing common code, like styling text or quoting code blocks, and can be used to save on typing.
Shorthand
Can't be bothered to type out all that code? Try these.
- [[wikipedia:]] link - Creates a link to a page on the English Wikipedia, with optional ability to set text.
- [[wikipedia:Main page]] → wikipedia:Main page
- [[wikipedia:Main page|Main Page on Wikipedia]] → Main Page on Wikipedia
- {{Usr}} - Links to a user.
- {{Usr|Example User}} → Example User
- {{@}} - Links to a user, and shows an @ symbol before their name.
- {{@|Example User}} → @Example User
- {{tl}} - Links to a template.
- {{tl|Example Template}} → {{Example Template}}
- {{cl}} - Links to a category.
- {{cl|Example Pages}} → Category:Example Pages
- {{il}} - Links to an image.
- {{il|Example.jpg}} → Example.jpg
- {{elc}} - Colours the text of an external link.
- {{elc|Example Page|red}} → Link Text
- {{sel}} - A shorthand method of including the CSS class "plainlinks" when linking to an external URL.
- {{sel|http://wiki.urbandead.com/index.php/Example_page|Example Page}} → Example Page
- {{ec}} - Been edit conflicted? Use this so it doesn't seem like you ignored the person who gave you the conflict.
- {{subst:ec}} Your Message. → Edit conflicted Your Message.
Text Styling
Need so make your text look prettier? Try these.
- {{c}} - Changes the colour of your text, and optionally highlights it.
- {{c|red|some text}} → some text
- {{c|red|some text|yellow}} → some text
- {{h}} - Highlights your text.
- {{h|yellow|some text}} → some text
- {{z}} - Changes the size of you text.
- {{z|75%|some text}} → some text
- {{s}} - Strikes out text in a clean way than the <s> HTML tag, select it to reveal it.
- {{s|some text}} → some text
- {{t}} - Gives your text a "title", usually seen when you mouseover it.
- {{t|some title text|some text}} → some text
- {{blink}} - Produces blinking text (on some browsers), illegal for signatures according to policy.
- {{blink|some text}} → some text
Textboxes
Need a textbox, or a way to display text prominently? Try these.
- <pre> tag
- For large blocks of text, it creates a box, tries to preserve formatting and automatically nowiki's text. It will stretch off the page for text that is too wide. Try {{Pre}} for a box that wraps text.
- <pre>some text</pre> →
some text
- <code> tag
- For smaller blocks of text, it creates a subtle inline box and displays text in a monospace font. It will stretch off the page for text that is too wide. Try {{CodeInline}} for a better box that wraps text.
- <code>some text</code> →
some text
- {{Code}}
- Similar to {{Pre}} but with slightly different colours.
- {{Code|some text}} → some text
- {{CodeInline}}
- For smaller blocks of text, it creates an obvious inline box and displays text in a monospace font. Better than the <code> tag.
- {{CodeInline|some text}} → some text
Quotations
Need to quote somebody on something? Use these.
- {{Squote}} - For a simple style of quote.
- {{Squote|Example Quotation|Attributation}} →
Example Quotation —Attributation
- {{Squote|Example Quotation|Attributation}} →
- {{Quote}} - A large quotebox, for quoting wiki users.
- {{Quote|Example User|Example Quotation}} →
Example User said: |
Example Quotation |
- {{Divquote}} - A large quotebox, for quoting wiki users.
- {{Divquote|Example User|Example Quotation}} →
Example User said: |
Example Quotation |
- {{IndentQuote}} - For quoting users without spoiling the indentation on talk pages.
- {{IndentQuote|author=Example User|text=Example Quotation}} →
- Example QuotationSaid by Example User
- {{IndentQuote|author=Example User|text=Example Quotation}} →
Useful Functions
Various templates that do something quite useful.
- {{Custom Title}}
- Creates text which appears on the page where the title usually sits, so it looks like the page has a different title. This doesn't actually change the title, and will break on skins other than Monobook or UrbanDead, so use only when needed.
- {{Purge}}
- Creates a link on a page which will puge the cache from the wiki server when clicked. Parameters allow for purging specific pages and control of link text and title.
- {{TOCright}}
- Floats the table of contents to the right, allowing text to wrap around it.
- {{TOCleft}}
- Floats the table of contents to the left, allowing text to wrap around it.
- {{ThumbRight}}
- For most pages, you can use wiki syntax for a thumbnail on the right. If you page has a coloured background, use this template to remove the ugly white border. Comparision shown on a grey background.
[[Image:Example.jpg|thumb|right|100px|Wiki Thumbnail]] →
{{ThumbRight|Example.jpg|100px|ThumbRight Thumbnail}} →
Wiki Syntax Escaping
Do you need to just display a character without the wiki thinking it means something special? Use these.
- {{!}}
- If you need a "real" pipe symbol (|) in a template variable, use this. The wiki will then treat is as a pipe only once the template evaluates. Useful if you want to put wiki table syntax into a template variable.
- {{*}}
- Need an asterisk at the beginning of a line without it becoming a bullet point? Use this.
Pages in category "Utility Templates"
The following 73 pages are in this category, out of 73 total.