Template:Tag

From Krafties
Revision as of 04:53, 25 June 2015 by MyraMidnight (talk | contribs)
Jump to navigation Jump to search
{{{title}}}
{{{message}}}


Documentation icon Template documentation ( view · talk · edit)
For the page status indicator Phabricator tags, see Template:ptag.

This template provides a quick way to mention an XML-style tag in a preformatted way. Mainly used in discussion/help pages.

Usage

  • first parameter(mandatory) the name of the HTML tag
  • second parameter — what type of tag to display:
    • p or pair(default) display a matched pair of open-and-close tags:
{{{title}}}
{{{message}}}


    • o or open – display only the opening tag of an open-and-close pair:
{{{title}}}
{{{message}}}


    • c or close – display only the closing tag of an open-and-close pair:
{{{title}}}
{{{message}}}


    • s or single – display a single tag:
{{{title}}}
{{{message}}}


  • content= — the text content of the tags
  • params= — any parameters to be included in the opening tag

Examples

  • {{tag|ref}}
{{{title}}}
{{{message}}}


  • {{tag|ref|content=hello}}
{{{title}}}
{{{message}}}


  • {{tag|font|content=foo}}
{{{title}}}
{{{message}}}


  • {{tag|font|open}}
{{{title}}}
{{{message}}}


  • {{tag|font|open|content=hello}}
{{{title}}}
{{{message}}}


  • {{tag|span|close|content=hello}}
{{{title}}}
{{{message}}}


  • {{tag|span|pair|content=hello}}
{{{title}}}
{{{message}}}


  • {{tag|ref|open|params=group=note}}
{{{title}}}
{{{message}}}


  • {{tag|references|single}}
{{{title}}}
{{{message}}}


  • {{tag|br|single}}
{{{title}}}
{{{message}}}


The above documentation is transcluded from Template:Tag/doc.
Editors can experiment in this template's sandbox
Please add categories to the /doc subpage within
{{{title}}}
{{{message}}}

This template is made to unify the overall design of all Tag Templates. But each tag can customize the color design.

This tag does not add any category, can be used as a General Notice tag

Default Colors - {{Tag}}

How to fill {{Tag|title=|message=}}
  • title=Tag heading
  • message=Tag content
  • align= optional, lets you change the text-align of the message

With Custom Color for border/title

To add custom color, just add these in the commands (no special order, just add them behind the order-sensitive commands if any)
  • color= font color in HTML colorname, HEX or rgb()
  • background= bacground/border color in HTML colorname, HEX or rgb()

When creating new tag templates

Please add the Tag/help template at the end within the Template Explanation
  • Adding custom commands through the Tag/help template will make them appear on the list

See Also