{{{1}}} [[Category:]]
This template is the same as {{Role}} but it will also automatically add the page to a category. This is meant for marginally simplifying the creation of role templates.
Parameters edit
{{rolecat|name|category|color|dark-background=yes|nocat=yes}}
name
- The name of the role. This will be the text that will appear in the template. This parameter is required.category
- 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 {{Role}} template.color
- The color of the role. Can be a hex code (you must include the #) or any other valid CSS color value. If not specified, defaults to #b9bbbe (the default Discord role color).dark-background=
- 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).nocat=
- 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.
Examples edit
Example usage of this template to create another template:
{{rolecat|Trollsome|Trollsome users|#9062f8|dark-background={{{dark-background|}}}|nocat={{{nocat|<noinclude>yes</noinclude>}}}}}
This will output Trollsome , as well as add the category Category:Trollsome users, but only on other pages.
Example usage of this template directly on a page:
{{rolecat|Trollsome|Trollsome users|#9062f8}}
This will output Trollsome , as well as add the category Category:Trollsome users.
TemplateData edit
Same as {{Role}}, but also adds the page to a category.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Role name | 1 | The name of the role. This will be the text that will appear.
| String | required |
Category | 2 | The name of the category that the page will be added to. Do not include "Category:".
| String | required |
Color | 3 | The color of the role. Can be a hex code (you must include the #, e.g. #ff7f00) or any other valid CSS color value.
| String | suggested |
Dark background | dark-background | Set this to "yes" to change the background color of the template to the dark color used on Discord profiles.
| String | optional |
nocat | nocat | 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.
| Boolean | optional |