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

Template:Meta title icon: Difference between revisions

Template page
mh:wikigenius>Parvej Husen Talukder
m 1 revision imported
Blossom (talk | contribs)
Created page with "<includeonly>{{#if:{{{name|}}}|{{#tag:indicator |[[File:{{{image|Face-tongue.svg}}}|{{{size|25px}}}|link={{{link|}}}|{{{text|}}}]] |name={{{name}}} }}| {{#ifeq:{{NAMESPACE}}|{{ns:10}}|Category:Templates with wrong or missing parameter|}}}} {{#ifeq:{{NAMESPACE}}|{{ns:10}}|Category:Templates inserting a title icon|}}</includeonly>"
 
Line 4: Line 4:
}}|
}}|
{{#ifeq:{{NAMESPACE}}|{{ns:10}}|[[Category:Templates with wrong or missing parameter]]|}}}}
{{#ifeq:{{NAMESPACE}}|{{ns:10}}|[[Category:Templates with wrong or missing parameter]]|}}}}
{{#ifeq:{{NAMESPACE}}|{{ns:10}}|[[Category:Templates inserting a title icon]]|}}</includeonly><noinclude><!--
{{#ifeq:{{NAMESPACE}}|{{ns:10}}|[[Category:Templates inserting a title icon]]|}}</includeonly>
 
Note about the code: it is using #tag to create the indicator tag because otherwise the name parameter of the indicator gets wrongly encoded. The result of that wrong encoding is that all indicators end up having the same name and only the last one is actually displayed.
 
-->==Usage==
This meta template is meant to be used exclusively in the creation of other templates (either alone or together with the usage of the {{tl|Meta banner}} template). It should not be used directly in articles.
 
Parameters:
;name:A name given to the icon. This name must be specific enough: there shouldn't be icons with the same name, otherwise only one of them would be displayed on pages whose code would include both.
;image:The file name of an image to be used as the title icon (just the file name, not preceded with "File:")
;size:The size of the image (default: 25px). The default size should be kept for icons meant to be displayed on article pages.
;link:The target page to which the icon will link, typically a Vikidia help page explaining what the icon represents.
;text:A short text that will be used instead of the image when the icon cannot be displayed (usual "alt" parameter on images) and displayed as tooltip otherwise.
 
==Example==
This code:
<pre><nowiki>{{Template:Meta title icon|name=exampleicon|image=Face-tongue.svg|text=example of title icon|link=Help:Emoticons}}</nowiki></pre>
...produces as a result the icon that you can see above, on the right of the page title.
{{Template:Meta title icon|name=exampleicon|image=Face-tongue.svg|text=example of title icon|link=Help:Emoticons}}
[[fr:Modèle:Icône de titre]]
[[Category:Meta templates|Title icon]]
[[Category:Templates inserting a title icon|*]]
</noinclude>

Latest revision as of 10:00, 28 December 2024