Template:Admon/tip/doc: Difference between revisions
No edit summary |
(Added category.) |
||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
__NOTOC__ | |||
==Usage== | |||
{{tl|Admon/tip}} creates an information box with a custom text denoting that something is to be considered as a tip/help text. The box will show at the position on the page where you put the template, and stretch horizontally to fill the width of the available space and vertically depending on how many rows of text are needed. | |||
To use the template, type <code><nowiki>{{Admon/tip|header|message body}}</nowiki></code>. | |||
==Parameters== | |||
There are two unnamed parameters for the header and the message body, respectively (below called <code>1</code> and <code>2</code>). The text inside the box can be formatted using wiki-code. | |||
==Usage== | ===Header=== | ||
'''<code>1</code>''': Custom text | |||
The first parameter is the header, and is automatically formatted as '''bold text'''. Thus, any text you enclose in three apostrophes (for bold text) in this field will be inverted (i.e. show as plain text). If you don't want to use a header, skip the header parameter by entering two pipes before the body text, leaving the header parameter empty, like so: <code><nowiki>{{Admon/tip||message body}}</nowiki></code>. | |||
'''Usage:''' | |||
* <code><nowiki>{{</nowiki>Admon/tip|'''header'''|message body<nowiki>}}</nowiki></code> | |||
===Body text=== | |||
'''<code>2</code>''': Custom text | |||
The second parameter is the message's body text, and is not pre-formatted. If you don't want to use any body text, you can skip the second parameter altogether, and only enter the header parameter, like so: <code><nowiki>{{Admon/tip|header}}</nowiki></code>. | |||
'''Usage:''' | |||
* <code><nowiki>{{</nowiki>Admon/tip|header|'''message body'''<nowiki>}}</nowiki></code> | |||
==Examples== | ==Examples== | ||
{| class="wikitable" | |||
|- | |||
! Example case !! What you write !! What you see | |||
|- | |||
| Only header || <code><nowiki>{{Admon/tip|The first parameter is automatically formatted as bold text.}}</nowiki></code> || {{Admon/tip|The first parameter is automatically formatted as bold text.}} | |||
|- | |||
| Only body text || <code><nowiki>{{Admon/tip||This is shown as plain text.}}</nowiki></code> || {{Admon/tip||This is shown as plain text.}} | |||
|- | |||
| Header and body text || <code><nowiki>{{Admon/tip|This is the header|This is the body text.}}</nowiki></code> || {{Admon/tip|This is the header|This is the body text.}} | |||
|- | |||
| Wiki-coding || <pre><nowiki>{{Admon/tip | |||
|Wiki-formatting for '''bold text''' is inverted in the header | |||
|The ''other rows'' '''behave as''' '''''normal'''''. <br /> | |||
You can use wiki-code to, e.g. | |||
[[link to stuff]], | |||
* list things, | |||
make text <small>small</small> or <big>big</big>, | |||
and include pre-format boxes. | |||
You can even | |||
insert empty rows.}}</nowiki></pre> || {{Admon/tip | |||
|Wiki-formatting for '''bold text''' is inverted in the header|The ''other rows'' '''behave as''' '''''normal'''''. <br /> | |||
You can use wiki-code to, e.g. | |||
[[link to stuff]], | |||
* list things, | |||
make text <small>small</small> or <big>big</big>, | |||
and include pre-format boxes. | |||
You can | |||
even | |||
insert empty rows.}} | |||
|} | |||
==See also== | ==See also== | ||
* {{tl|Admon/caution}} | |||
* {{tl|Admon/important}} | |||
* {{tl|Admon/note}} | |||
* {{tl|label}} | |||
* {{tl|message}} | |||
** {{tl|message/box}} | |||
Line 13: | Line 75: | ||
<includeonly> | <includeonly> | ||
[[Category:Admonition templates|Tip]] | [[Category:Admonition templates|Tip]] | ||
[[Category:Message box templates|tip]] | |||
</includeonly> | </includeonly> |
Latest revision as of 09:43, 29 January 2015
Usage
{{Admon/tip}} creates an information box with a custom text denoting that something is to be considered as a tip/help text. The box will show at the position on the page where you put the template, and stretch horizontally to fill the width of the available space and vertically depending on how many rows of text are needed.
To use the template, type {{Admon/tip|header|message body}}
.
Parameters
There are two unnamed parameters for the header and the message body, respectively (below called 1
and 2
). The text inside the box can be formatted using wiki-code.
Header
1
: Custom text
The first parameter is the header, and is automatically formatted as bold text. Thus, any text you enclose in three apostrophes (for bold text) in this field will be inverted (i.e. show as plain text). If you don't want to use a header, skip the header parameter by entering two pipes before the body text, leaving the header parameter empty, like so: {{Admon/tip||message body}}
.
Usage:
{{Admon/tip|header|message body}}
Body text
2
: Custom text
The second parameter is the message's body text, and is not pre-formatted. If you don't want to use any body text, you can skip the second parameter altogether, and only enter the header parameter, like so: {{Admon/tip|header}}
.
Usage:
{{Admon/tip|header|message body}}
Examples
Example case | What you write | What you see |
---|---|---|
Only header | {{Admon/tip|The first parameter is automatically formatted as bold text.}} |
|
Only body text | {{Admon/tip||This is shown as plain text.}} |
|
Header and body text | {{Admon/tip|This is the header|This is the body text.}} |
|
Wiki-coding | {{Admon/tip |Wiki-formatting for '''bold text''' is inverted in the header |The ''other rows'' '''behave as''' '''''normal'''''. <br /> You can use wiki-code to, e.g. [[link to stuff]], * list things, make text <small>small</small> or <big>big</big>, and include pre-format boxes. You can even insert empty rows.}} |
See also
- {{Admon/caution}}
- {{Admon/important}}
- {{Admon/note}}
- {{label}}
- {{message}}
- {{message/box}}