Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Example: Difference between revisions

Template page
m Remove extra line break
Update formatting to make it more subtle and better suited for its purpose (for a template similar to the previous iteration, use Template:Note box)
Line 1: Line 1:
{{Color box|color=#404050|border=#9999AA|{{{1|An example!}}} }}<noinclude>
<div style="background-color:#161626; border: 1px solid #6666a8; padding:0.8em; text-align:left; color:#ffffff; overflow:hidden; font-size:90%;">{{{1|An example!}}}</div><noinclude>
== Documentation ==
== Documentation ==
As the name suggests, this template produces a colored box, which is used when you want to give an example on a page. You can use common wiki-formatting (eg bold, links) if you wish.  
As the name suggests, this template produces a colored box, which is used when you want to give an example on a page. You can use common wiki-formatting (eg bold, links) if you wish (the text is rendered in italics). The formatting of this template is kept subtle on purpose, so as not to interfere too much with the general flow of a page (if you want a stronger emphasis for your text, you can use <code>{{t|note box}}</code> or even <code>{{t|important note box}}</code>).


If the text you would like to use include an equals sign (=), you need to explicitly declare your text as a numbered parameter (i.e. put <code>1=</code> before your example text), otherwise the template will display nothing.
If the text you would like to use include an equals sign (=), you need to explicitly declare your text as a numbered parameter (i.e. put <code>1=</code> before your example text), otherwise the template will display nothing.
Line 15: Line 15:
<code><nowiki>{{example|1=How to put the formula 2+2=4 into an example.}}</nowiki></code> gives:
<code><nowiki>{{example|1=How to put the formula 2+2=4 into an example.}}</nowiki></code> gives:
{{example|1=How to put the formula 2+2=4 into an example.}}
{{example|1=How to put the formula 2+2=4 into an example.}}
== See also ==
*<code>{{t|note box}}</code> and <code>{{t|important note box}}</code>, designed for general notes and warnings on pages.
*<code>{{t|color box}}</code>, the general template for creating coloured boxes with text in them.


[[Category:Template]]</noinclude>
[[Category:Template]]</noinclude>

Revision as of 11:17, 20 May 2014

An example!

Documentation

As the name suggests, this template produces a colored box, which is used when you want to give an example on a page. You can use common wiki-formatting (eg bold, links) if you wish (the text is rendered in italics). The formatting of this template is kept subtle on purpose, so as not to interfere too much with the general flow of a page (if you want a stronger emphasis for your text, you can use {{note box}} or even {{important note box}}).

If the text you would like to use include an equals sign (=), you need to explicitly declare your text as a numbered parameter (i.e. put 1= before your example text), otherwise the template will display nothing.

Examples

{{example|An example to '''illustrate''' my article with a link to the [[Venture]].}} gives:

An example to illustrate my article with a link to the Venture.

{{example|How not to put the formula 2+2=4 into an example.}} gives:

An example!

{{example|1=How to put the formula 2+2=4 into an example.}} gives:

How to put the formula 2+2=4 into an example.

See also