Template:Notice/doc: Difference between revisions

Content added Content deleted
(change in hidden text)
(→‎Adding shortcuts or images: updated document with information regarding the new "shortcut" parameter)
Line 117: Line 117:
</pre>
</pre>


=== Adding shortcuts or images ===
=== Adding shortcuts {or images to the right side) ===


To add shortcuts, images, or other templates to the right side of the image, the following syntax can be used:
To add shortcuts, images, or other templates to the right side of the image, the following syntax can be used:


<pre>
<pre>
{{notice|Include text here.|imageright = TEMPLATE OR IMAGE }}
{{notice|Include text here.|imageright = IMAGE OR TEMPLATE }}
</pre>
</pre>


For example, the following has the {{Tl|Shortcut}} template included into it, with a link to [[You]] and [[Me]]:
For example, the following has the [[:File:Wiki letter w.svg]] picture included into it:

<nowiki>{{notice|Include text here.|imageright = [[File:Wiki letter w.svg|40px]] }}</nowiki>

Which renders like this:

{{notice|Include text here.|imageright = [[File:Wiki letter w.svg|40px]] }}

The following has the {{Tl|Shortcut}} template included into it, with a link to [[You]] and [[Me]]:


<nowiki>{{notice|Include text here.|imageright =</nowiki> {{Tlx|Shortcut|You|Me}} <nowiki>}}</nowiki>
<nowiki>{{notice|Include text here.|imageright =</nowiki> {{Tlx|Shortcut|You|Me}} <nowiki>}}</nowiki>
Line 132: Line 140:


{{notice|Include text here.|imageright = {{Shortcut|You|Me}} }}
{{notice|Include text here.|imageright = {{Shortcut|You|Me}} }}

====Alternate shortcut option====

Alternately, instead of using the "imageright" parameter to input shortcuts, the "shortcut" parameter (as well as "shortcut2", "shortcut3", "shortcut4", and "shortcut5") can be used '''instead''' of "imageright". The following syntax can be used to add shortcuts:

<nowiki>{{notice|title=Include text here.|shortcut = Me | shortcut2 = You | shortcut3 = Them | shortcut4 = Us | shortcut5 = Everyone}}</nowiki>

Which renders like this:

{{notice|title=Include text here.|shortcut = Me | shortcut2 = You | shortcut3 = Them | shortcut4 = Us | shortcut5 = Everyone}}

'''''Technical note''''': if both the "imageright" and the "shortcut" parameters are used, '''only''' the image/template in the "imageright" template will display. Here is an example of syntax with the "imageright" and "shortcut" parameters:

<nowiki>{{notice|title=Include text here.|imageright = [[File:Wiki letter w.svg|40px]] |shortcut = Me | shortcut2 = You | shortcut3 = Them | shortcut4 = Us | shortcut5 = Everyone}}</nowiki>

Which renders like this:

{{notice|title=Include text here.|imageright = [[File:Wiki letter w.svg|40px]] |shortcut = Me | shortcut2 = You | shortcut3 = Them | shortcut4 = Us | shortcut5 = Everyone}}


== See also ==
== See also ==