Template:Note: Difference between revisions
m compat alias 'notice' to 'info' |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 7: | Line 7: | ||
|#default={{{2|{{{type|}}}}}} | |#default={{{2|{{{type|}}}}}} | ||
}} {{#ifeq:{{{inline|}}}|1|note-inline}}">{{{1|{{{content|{{{text}}}}}}}}}</div> | }} {{#ifeq:{{{inline|}}}|1|note-inline}}">{{{1|{{{content|{{{text}}}}}}}}}</div> | ||
| [[File:OOjs UI icon lightbulb-yellow.svg|18px|alt= | | [[File:OOjs UI icon lightbulb-yellow.svg|18px|alt=Note|link=]] '''Note:''' }}<!-- | ||
--></onlyinclude> | --></onlyinclude> | ||
{{documentation|content= | {{documentation|content= | ||
== Usage == <!--T:3--> | == Usage == <!--T:3--> | ||
<pre> | <pre> | ||
{{Note|text=Foo}} | {{Note|text=Foo}} | ||
Line 20: | Line 18: | ||
{{Note|type=warn|text=Foo}} | {{Note|type=warn|text=Foo}} | ||
{{Note|type=error|text=Foo}} | {{Note|type=error|text=Foo}} | ||
{{Note}} < | {{Note}} <nowrap>Loose test</> | ||
* Text {{Note|inline=1|text=Foo}} | * Text {{Note|inline=1|text=Foo}} | ||
Line 30: | Line 28: | ||
{{Note|type=warn|text=Foo}} | {{Note|type=warn|text=Foo}} | ||
{{Note|type=error|text=Foo}} | {{Note|type=error|text=Foo}} | ||
{{Note}} | {{Note}}Loose test | ||
* Text {{Note|inline=1|text=Foo}} | * Text {{Note|inline=1|text=Foo}} | ||
Latest revision as of 07:51, 16 January 2024
<languages/>
{{#if: demo |
| Note Note: }}
Usage
{{Note|text=Foo}} {{Note|type=info|text=Foo}} {{Note|type=reminder|text=Foo}} {{Note|type=reminder|text=Multiple<br>lines<br>of<br>text}} {{Note|type=warn|text=Foo}} {{Note|type=error|text=Foo}} {{Note}} <nowrap>Loose test</> * Text {{Note|inline=1|text=Foo}}{{#if: Foo |
| Note Note: }}
{{#if: Foo | | Note Note: }}
{{#if: Foo | | Note Note: }}
{{#if: Multiplelines
of
text |
lines
of
text
| Note Note: }}
{{#if: Foo | | Note Note: }}
{{#if: Foo | | Note Note: }}
{{#if: | | Note Note: }}Loose test
- Text {{#if: Foo | Foo
| Note Note: }}
Parameters
{{#switch:<translate></translate> | = {{#if:{{#ifexpr: ( {{#ifeq:note|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:note|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}
|
{{#ifeq:show |show
| Template:Mbox }}{{#if: | | {{#ifexist:Template:Note | [[Category:{{#switch:Template | Template | Project = Template | Module = Module | User = User | #default = MediaWiki }} documentation pages{{#translation:}}]] | [[Category:Documentation subpages without corresponding pages{{#translation:}}]] }} }} | }}
| #default=
{{#switch:
| = {{#if:{{#ifexpr: ( {{#ifeq:note|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:note|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}
|
{{#ifeq:show |show
| Template:Mbox }}{{#if: | | {{#ifexist:Template:Note | [[Category:{{#switch:Template | Template | Project = Template | Module = Module | User = User | #default = MediaWiki }} documentation pages{{#translation:}}]] | [[Category:Documentation subpages without corresponding pages{{#translation:}}]] }} }} | }}
| #default=
Lua error: expandTemplate: template loop detected.
}} }} {{#switch:<translate></translate> |=
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|{{#ifexpr:{{#if:Note/doc|{{#ifeq:Template:Note|{{#switch:
|#default = Note/doc | = {{#ifeq: | | Template:Note/doc | Note/doc }}
}}|0|1}}|not{{#ifexpr: ( {{#ifeq:note|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:note|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|0}}}}|
|#default = Note/doc | = {{#ifeq: | | Template:Note/doc | Note/doc }}
}}|<span style="" title="<translate nowrap> View this template</translate>">{{#if:|<translate> v</translate>|<translate> view</translate>}}]] · [[[:Template:Fullurl:]] <span style="" title="<translate nowrap> Discuss this template</translate>">{{#if:|<translate> d</translate>|<translate> talk</translate>}}]{{#if:|| · [{{fullurl:{{#switch:
|#default = Note/doc | = {{#ifeq: | | Template:Note/doc | Note/doc }}
}}|action=edit}} <span style="" title="<translate nowrap> Edit this template</translate>">{{#if:|<translate> e</translate>|<translate> edit</translate>}}]}}{{#if:1|]}}}}}} {{#if:||<translate> This is the [[<tvar name=1>Special:MyLanguage/Help:TemplateData</tvar>|TemplateData]] documentation for this template used by [[<tvar name=2>Special:MyLanguage/VisualEditor</tvar>|VisualEditor]] and other tools.</translate>}}
Note
{{#ifeq:note|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:note|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}|[[Category:TemplateData documentation{{#translation:}}]]|[[Category:Templates using TemplateData{{#translation:}}]]}}}} | #default=
{{#switch:
|=
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|{{#ifexpr:{{#if:Note/doc|{{#ifeq:Template:Note|{{#switch:
|#default = Note/doc | = {{#ifeq: | | Template:Note/doc | Note/doc }}
}}|0|1}}|not{{#ifexpr: ( {{#ifeq:note|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:note|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|0}}}}|
|#default = Note/doc | = {{#ifeq: | | Template:Note/doc | Note/doc }}
}}|<span style="" title="<translate nowrap> View this template</translate>">{{#if:|<translate> v</translate>|<translate> view</translate>}}]] · [[[:Template:Fullurl:]] <span style="" title="<translate nowrap> Discuss this template</translate>">{{#if:|<translate> d</translate>|<translate> talk</translate>}}]{{#if:|| · [{{fullurl:{{#switch:
|#default = Note/doc | = {{#ifeq: | | Template:Note/doc | Note/doc }}
}}|action=edit}} <span style="" title="<translate nowrap> Edit this template</translate>">{{#if:|<translate> e</translate>|<translate> edit</translate>}}]}}{{#if:1|]}}}}}} {{#if:||This is the TemplateData documentation for this template used by VisualEditor and other tools.}}
Note
{{#ifeq:note|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:note|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}|[[Category:TemplateData documentation{{#translation:}}]]|[[Category:Templates using TemplateData{{#translation:}}]]}}}} | #default=
Lua error: expandTemplate: template loop detected.
}} }}
Show a note in a box (e.g. a top-of-the-page warning).
Parameter | Description | Type | Status | |
---|---|---|---|---|
Inline formatting | inline | Show the template without line breaks before and after it.
| Boolean | optional |
Type | type 2 | One of “info”, “reminder”, “warn”, or “error”. This setting affects the color and icon.
| String | optional |
Text | text 1 content | Informative note. | Content | required |
{{#switch:Note|sandbox|doc=|#default= [[Category:Notice templates{{#translation:}}]] }}
See also
{{#if:== Usage ==
{{Note|text=Foo}} {{Note|type=info|text=Foo}} {{Note|type=reminder|text=Foo}} {{Note|type=reminder|text=Multiple<br>lines<br>of<br>text}} {{Note|type=warn|text=Foo}} {{Note|type=error|text=Foo}} {{Note}} <nowrap>Loose test</> * Text {{Note|inline=1|text=Foo}}
{{#if: Foo |
| Note Note: }}
{{#if: Foo |
| Note Note: }}
{{#if: Foo |
| Note Note: }}
{{#if: Multiple
lines
of
text |
lines
of
text
| Note Note: }}
{{#if: Foo |
| Note Note: }}
{{#if: Foo |
| Note Note: }}
{{#if: |
| Note Note: }}Loose test
- Text {{#if: Foo | Foo
| Note Note: }}
Parameters
{{#switch:<translate></translate> | = {{#if:{{#ifexpr: ( {{#ifeq:note|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:note|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}
|
{{#ifeq:show |show
| Template:Mbox }}{{#if: | | {{#ifexist:Template:Note | [[Category:{{#switch:Template | Template | Project = Template | Module = Module | User = User | #default = MediaWiki }} documentation pages{{#translation:}}]] | [[Category:Documentation subpages without corresponding pages{{#translation:}}]] }} }} | }}
| #default=
{{#switch:
| = {{#if:{{#ifexpr: ( {{#ifeq:note|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:note|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}
|
{{#ifeq:show |show
| Template:Mbox }}{{#if: | | {{#ifexist:Template:Note | [[Category:{{#switch:Template | Template | Project = Template | Module = Module | User = User | #default = MediaWiki }} documentation pages{{#translation:}}]] | [[Category:Documentation subpages without corresponding pages{{#translation:}}]] }} }} | }}
| #default=
Lua error: expandTemplate: template loop detected.
}} }} {{#switch:<translate></translate> |=
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|{{#ifexpr:{{#if:Note/doc|{{#ifeq:Template:Note|{{#switch:
|#default = Note/doc | = {{#ifeq: | | Template:Note/doc | Note/doc }}
}}|0|1}}|not{{#ifexpr: ( {{#ifeq:note|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:note|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|0}}}}|
|#default = Note/doc | = {{#ifeq: | | Template:Note/doc | Note/doc }}
}}|<span style="" title="<translate nowrap> View this template</translate>">{{#if:|<translate> v</translate>|<translate> view</translate>}}]] · [[[:Template:Fullurl:]] <span style="" title="<translate nowrap> Discuss this template</translate>">{{#if:|<translate> d</translate>|<translate> talk</translate>}}]{{#if:|| · [{{fullurl:{{#switch:
|#default = Note/doc | = {{#ifeq: | | Template:Note/doc | Note/doc }}
}}|action=edit}} <span style="" title="<translate nowrap> Edit this template</translate>">{{#if:|<translate> e</translate>|<translate> edit</translate>}}]}}{{#if:1|]}}}}}} {{#if:||<translate> This is the [[<tvar name=1>Special:MyLanguage/Help:TemplateData</tvar>|TemplateData]] documentation for this template used by [[<tvar name=2>Special:MyLanguage/VisualEditor</tvar>|VisualEditor]] and other tools.</translate>}}
Note
{{#ifeq:Note|sandbox||{{#if:{{#ifexpr: (
{{#ifeq:note|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:note|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}|[[Category:TemplateData documentation{{#translation:}}]]|[[Category:Templates using TemplateData{{#translation:}}]]}}}} | #default=
{{#switch:
|=
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|{{#ifexpr:{{#if:Note/doc|{{#ifeq:Template:Note|{{#switch:
|#default = Note/doc | = {{#ifeq: | | Template:Note/doc | Note/doc }}
}}|0|1}}|not{{#ifexpr: ( {{#ifeq:note|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:note|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|0}}}}|
|#default = Note/doc | = {{#ifeq: | | Template:Note/doc | Note/doc }}
}}|<span style="" title="<translate nowrap> View this template</translate>">{{#if:|<translate> v</translate>|<translate> view</translate>}}]] · [[[:Template:Fullurl:]] <span style="" title="<translate nowrap> Discuss this template</translate>">{{#if:|<translate> d</translate>|<translate> talk</translate>}}]{{#if:|| · [{{fullurl:{{#switch:
|#default = Note/doc | = {{#ifeq: | | Template:Note/doc | Note/doc }}
}}|action=edit}} <span style="" title="<translate nowrap> Edit this template</translate>">{{#if:|<translate> e</translate>|<translate> edit</translate>}}]}}{{#if:1|]}}}}}} {{#if:||This is the TemplateData documentation for this template used by VisualEditor and other tools.}}
Note
{{#ifeq:Note|sandbox||{{#if:{{#ifexpr: (
{{#ifeq:note|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:note|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}|[[Category:TemplateData documentation{{#translation:}}]]|[[Category:Templates using TemplateData{{#translation:}}]]}}}} | #default=
Lua error: expandTemplate: template loop detected.
}} }}
Show a note in a box (e.g. a top-of-the-page warning).
Parameter | Description | Type | Status | |
---|---|---|---|---|
Inline formatting | inline | Show the template without line breaks before and after it.
| Boolean | optional |
Type | type 2 | One of “info”, “reminder”, “warn”, or “error”. This setting affects the color and icon.
| String | optional |
Text | text 1 content | Informative note. | Content | required |
{{#switch:Note|sandbox|doc=|#default= [[Category:Notice templates{{#translation:}}]] }}
See also
- {{warn}}, shortcut for this template with
type=warning
. - {{mbox}}, and in particular the namespace-agnostic {{ombox}}, which by default resembles a typical "info" template.|
[[Category:Template documentation pages{{#translation:}}]] }} [[Category:Templates{{#translation:}}|Note]]