Template:Template-help: Difference between revisions
From The DarkMod Wiki
Jump to navigationJump to search
first version |
mNo edit summary |
||
(4 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
This template | <noinclude> | ||
This template generates a help message for other '''templates'''. | |||
=== Usage === | === Usage === | ||
Include this template at the bottom of {{{name|foo}}}-related articles like so: | Include this template inside a <code><nowiki><noinclude> </noinclude></nowiki></code> section of | ||
any template that is used for categorizing pages like so: | |||
<nowiki>{{</nowiki>{template-help|name=Foo|sort=foo|where=bottom}<nowiki>}}</nowiki> | |||
=== Parameters === | |||
# The '''name''' parameter is the name of the template that includes the help. | |||
# The '''sort''' parameter for this template influences the place where the template will be sorted in the ''Template'' category. | |||
# the '''where''' parameter should be either '''top''' or '''bottom'''. | |||
{|border=1 cellspacing=0 cellpadding=3 | |||
|- | |||
!bgcolor=#ffdead|Example | |||
!bgcolor=#ffdead|Description | |||
|- | |||
|<nowiki>{{{template-help|name=foo}}}</nowiki> | |||
|default sorting order based on template name | |||
|- | |||
|<nowiki>{{{template-help|name=foo|sort=Foo}}}</nowiki> | |||
|an template foo goes under "F" (specifically "Foo") | |||
|- | |||
|<nowiki>{{{template-help|name=foo|sort=Foo|where=top}}}</nowiki> | |||
|The template help instructs the user to include the template at the top (default is bottom) | |||
|} | |||
[[Category:Templates]] | |||
</noinclude> | |||
<includeonly> | |||
This template sorts the including article into the right '''{{{sort|foo}}}''' category. | |||
=== Usage === | |||
Include this template at the '''{{{where|bottom}}}''' of '''{{{name|foo}}}'''-related articles like so: | |||
<nowiki>{{</nowiki>{{{name|foo}}}<nowiki>}}</nowiki> | <nowiki>{{</nowiki>{{{name|foo}}}<nowiki>}}</nowiki> | ||
Line 28: | Line 67: | ||
|} | |} | ||
[[Category:Templates|{{{sort}}}]] | [[Category:Templates|{{{sort}}}]] | ||
</includeonly> | </includeonly> |
Latest revision as of 15:22, 22 November 2022
This template generates a help message for other templates.
Usage
Include this template inside a <noinclude> </noinclude>
section of
any template that is used for categorizing pages like so:
{{{template-help|name=Foo|sort=foo|where=bottom}}}
Parameters
- The name parameter is the name of the template that includes the help.
- The sort parameter for this template influences the place where the template will be sorted in the Template category.
- the where parameter should be either top or bottom.
Example | Description |
---|---|
{{{template-help|name=foo}}} | default sorting order based on template name |
{{{template-help|name=foo|sort=Foo}}} | an template foo goes under "F" (specifically "Foo") |
{{{template-help|name=foo|sort=Foo|where=top}}} | The template help instructs the user to include the template at the top (default is bottom) |