Editing
Template:Rolecat/doc
Jump to navigation
Jump to search
β οΈ
Warning:
You are not logged in.
Your IP address will be publicly visible
if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username instead of your IP, along with other benefits.
Anti-spam check. Do
not
fill this in!
This template is the same as {{tl|Role}} but it will also automatically add the page to a category. This is meant for marginally simplifying the creation of role templates. == Parameters == <code>{{rolecat|''name''|''category''|''color''|dark-background=''yes''|nocat=''yes''}}</code> * <code>name</code> - The name of the role. This will be the text that will appear in the template. This parameter is required. * <code>category</code> - The name of the category that the transcluding page will be added to. Do not include "Category:". This parameter is required; if you don't need it, just use the regular {{tl|Role}} template. * <code>color</code> - The color of the role. Can be a hex code (you must include the #) or any other [https://developer.mozilla.org/en-US/docs/Web/CSS/color_value valid CSS color value]. If not specified, defaults to ''#b9bbbe'' (the default Discord role color). * <code>dark-background=</code> - Set this to "yes" to change the background color of the template to the dark color used on Discord profiles. Otherwise, the background will remain white (or whatever color the surrounding background is). * <code>nocat=</code> - Set this to "yes" to not add the page to the category. You should use this on the template page, enclosed with <code><nowiki><noinclude></noinclude></nowiki></code>, so that the template itself isn't added to the category. == Examples == Example usage of this template to create another template: <code><nowiki>{{rolecat|Trollsome|Trollsome users|#9062f8|dark-background={{{dark-background|}}}|nocat={{{nocat|<noinclude>yes</noinclude>}}}}}</nowiki></code> This will output {{role|Trollsome|#9062f8}}, as well as add the category [[:Category:Trollsome users]], but only on other pages. Example usage of this template directly on a page: <code><nowiki>{{rolecat|Trollsome|Trollsome users|#9062f8}}</nowiki></code> This will output {{role|Trollsome|#9062f8}}, as well as add the category [[:Category:Trollsome users]]. == TemplateData == <templatedata> { "params": { "1": { "label": "Role name", "description": "The name of the role. This will be the text that will appear.", "example": "Was it worth it?", "type": "string", "required": true }, "2": { "label": "Category", "description": "The name of the category that the page will be added to. Do not include \"Category:\".", "example": "Trollsome users", "type": "string", "required": true }, "3": { "label": "Color", "description": "The color of the role. Can be a hex code (you must include the #, e.g. #ff7f00) or any other valid CSS color value.", "type": "string", "default": "#b9bbbe", "suggested": true }, "dark-background": { "label": "Dark background", "description": "Set this to \"yes\" to change the background color of the template to the dark color used on Discord profiles.", "example": "yes", "type": "string" }, "nocat": { "description": "Set this to \"yes\" to not add the page to the category. You should use this on the template page, enclosed with <noinclude></noinclude>, so that the template itself isn't added to the category.", "example": "{{{nocat|<noinclude>yes</noinclude>}}}", "type": "boolean" } }, "description": "Same as {{Role}}, but also adds the page to a category.", "paramOrder": [ "1", "2", "3", "dark-background", "nocat" ], "format": "inline" } </templatedata>
Summary:
Please note that all contributions to Irony Wiki are considered to be released under the Creative Commons Attribution-ShareAlike (see
Irony Wiki:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Role
(
edit
)
Template:Role/styles.css
(
edit
)
Template:Tl
(
view source
) (protected)
Template:Yesno
(
edit
)
Navigation menu
Personal tools
English
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Template
Discussion
English
Views
Read
Edit source
View history
More
Purge cache
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information
Page values