Template:Uses TemplateStyles/doc: Difference between revisions
More actions
←Created page with '{{Lua|Module:Uses TemplateStyles}} {{TemplateBox |1 = 1 |1label-en= stylesheet |1d-en = Title of the stylesheet page, with namespace |1aliases...' |
Add `setscats` parameter to {{TemplateBox}} |
||
| Line 52: | Line 52: | ||
|usage-notes = | |usage-notes = | ||
|shorthand = | |shorthand = | ||
|setscats = | |setscats = | ||
* {{cl|{{#invoke:Data|Module:Uses TemplateStyles/config|default_category}}}}, added if no custom category is specified in the template call. | |||
* {{cl|{{#invoke:Data|Module:Uses TemplateStyles/config|protection_conflict_category}}}}, added if the protection level of any stylesheet differs from the one of the template. | |||
|seealso = | |seealso = | ||
|type = | |type = | ||
Revision as of 16:31, 10 June 2021
No description yet available.
The template automatically sets the following categories:
- Category:Templates using TemplateStyles, added if no custom category is specified in the template call.
- Category:Templates using TemplateStyles with a different protection level, added if the protection level of any stylesheet differs from the one of the template.
Usage
{{Uses TemplateStyles |1= }}
Template parameters
- TemplateData
TemplateData is a way to store information about template parameters (the description of those and of the whole template) for both humans and machines. It is used by VisualEditor and possibly other tools like Upload Wizard.
Existing template documentation
At Wikimedia Commons, it is recommended to use {{TemplateBox}} with either useTemplateData=1 or useTemplateData=only on the /doc subpage and transcluding it with {{Documentation}} into the template. <nowiki>-tags can be wrapped around the arguments, if required, to avoid templates being expanded.
Newly created template documentation and imports
Another option, especially for imported templates, or for users with JSON experience, is placing raw <templatedata>-tags into the Wikitext of the template, as described in various Wikipediae.
Wikipedia's help about TemplateData • Commons-specific information
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| stylesheet | 1 | Title of the stylesheet page, with namespace | Page name | required |
| additional stylesheet | 2 | Titles of additional stylesheet pages: second as second unnamed parameter, third as third unnamed parameter etc. | Page name | optional |
| main category | category | Main category to put on pages using this template, without namespace prefix
| Line | optional |
| disable categorization | nocat | Whether to disable categorization: “no”, “0” etc. allow categorization, “yes”, “1” etc. disable it
| Boolean | optional |
| disable protection level check | noprotcat | Whether to disable checking that the stylesheet page has same protection level as the main template: “no”, “0” etc. allow check, “yes”, “1” etc. disable it
| Boolean | optional |
Additional information
The template is intended to be used in the following namespaces: the Template namespace
The template is intended to be used by the following user groups: no user group specified
Placement: At the top of the page
Example
{{Uses TemplateStyles|Template:Uses TemplateStyles/example.css}}
renders as:
Localization
This template is not intended to be localized.