Template:Notify/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
Line 19: Line 19:
|-
|-
| align="center" | {{Code|style=2|{{Param|1}}}} or {{Code|style=2| {{Param|text}} }}
| align="center" | {{Code|style=2|{{Param|1}}}} or {{Code|style=2| {{Param|text}} }}
| Your text. {{ModernWarning|Do not use {{Param|1}} if you are using this template as the basis for another template. In this case, you only need to use {{Param|text}} to avoid formatting problems.}}
| style="padding:10px" | Your text.
| {{CodeBlock|margin = 5px|<nowiki>| Hello, World!</nowiki>}} {{CodeBlock|margin = 5px|<nowiki>| text = Hello, World!</nowiki>}}
| {{CodeBlock|margin = 5px|<nowiki>| Hello, World!</nowiki>}} {{CodeBlock|margin = 5px|<nowiki>| text = Hello, World!</nowiki>}}
| style="padding:5px" | {{Notify|Hello, World!}} {{Notify|text = Hello, World!}}
| style="padding:5px" | {{Notify|Hello, World!}} {{Notify|text = Hello, World!}}
|-
|-
| align="center" | {{Code|style=2| {{Param|mode}} }}
| align="center" | {{Code|style=2| {{Param|mode}} }}
| Switches the template modes. Avaliable modes:
| style="padding:10px" | Switches the template modes. Avaliable modes:
* {{Code|<nowiki>inline</nowiki>}}
* {{Code|<nowiki>inline</nowiki>}}
| {{CodeBlock|margin = 5px|<nowiki>| mode = inline</nowiki>}}
| {{CodeBlock|margin = 5px|<nowiki>| mode = inline</nowiki>}}

Revision as of 00:05, 25 April 2023

Edit-copy.png
This is a documentation subpage for Template:Notify.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

Different types of notifications in one template. Created as a basis for other templates.

Copy and Paste

{{Notify | mode = inline | img = | text = | color = }}

Parameters and Example

Shared

Parameter Description Example Preview
{{{1}}} or {{{text}}} Your text.
| Hello, World!
| text = Hello, World!
Hello, World!
Hello, World!
{{{mode}}} Switches the template modes. Avaliable modes:
  • inline
| mode = inline
Hello, World!

Inline mode

Parameter Description Example Preview
{{{img}}} Notification icon.
| img = Note.png
Hello, World!
{{{type}}} Notification type.
| type = Warning
Note.pngWarning:Hello, World!
{{{color}}} Notification color (RGB only).
| color = 240,120,80
Note.pngWarning:Hello, World!

Special Subpages

See Also