Template:Uses TemplateStyles/doc
{{#ifeq:doc |doc
|
{{#ifeq:show |show
| Script error: No such module "Message box".
}}{{#if: |
| {{#ifexist:Template:Uses TemplateStyles
| [[Category:{{#switch:Template |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]]
|
}}
}}
|
}}
Script error: No such module "Lua banner".
This template is used to show that templates have been converted to use Template:Ll. It is placed at the top of the template's /doc page. It automatically adds the template to [[:Category:Script error: No such module "Data".]], or to one of its subcategories.
Usage
- Basic
- <templatestyles src="Template:Mono/styles.css"/>{{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|<templatestyles src="Template:Nowrap/styles.css"/>}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:Uses TemplateStyles|Uses TemplateStyles]]{{#if:TemplateStyles page name||TemplateStyles page name}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}Template:))
- All parameters
- <templatestyles src="Template:Mono/styles.css"/>{{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|<templatestyles src="Template:Nowrap/styles.css"/>}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:Uses TemplateStyles|Uses TemplateStyles]]{{#if:TemplateStyles page 1||TemplateStyles page 1}}{{#if:TemplateStyles page 2||TemplateStyles page 2}}{{#if:TemplateStyles page 3||TemplateStyles page 3}}{{#if:...||...}}{{#if:categoryTemplate:=custom category||categoryTemplate:=custom category}}{{#if:nocatTemplate:=true||nocatTemplate:=true}}{{#if:||...}}Template:))
The first TemplateStyles page name is required.
TemplateStyles sandboxes
Note that if a sandbox version of the TemplateStyle exists, it will also be linked. This is only for sandbox versions. The subpage name of the sandbox version should be the same, but as a subpage of the templates sandbox. For example, if the TemplateStyles page name is Template:Foo/styles.css
, then the sandbox version should be Template:Foo/sandbox/styles.css
Examples
One style page
<templatestyles src="Template:Mono/styles.css"/>{{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|<templatestyles src="Template:Nowrap/styles.css"/>}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:Uses TemplateStyles|Uses TemplateStyles]]{{#if:Template:Arrowlist/styles.css||Template:Arrowlist/styles.css}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}Template:)) {{Uses TemplateStylesTemplate:\sandbox|Template:Arrowlist/styles.css|nocat=true}}
Multiple style pages
<templatestyles src="Template:Mono/styles.css"/>{{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|<templatestyles src="Template:Nowrap/styles.css"/>}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:Uses TemplateStyles|Uses TemplateStyles]]{{#if:Template:Arrowlist/styles.css||Template:Arrowlist/styles.css}}{{#if:Template:Routemap/styles.css||Template:Routemap/styles.css}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}Template:)) {{Uses TemplateStylesTemplate:\sandbox|Template:Arrowlist/styles.css|Template:Routemap/styles.css|nocat=true}}
Sandbox version of style page exists
<templatestyles src="Template:Mono/styles.css"/>{{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|<templatestyles src="Template:Nowrap/styles.css"/>}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:Uses TemplateStyles|Uses TemplateStyles]]{{#if:Template:Uses TemplateStyles/example.css||Template:Uses TemplateStyles/example.css}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}Template:)) {{Uses TemplateStylesTemplate:\sandbox|Template:Uses TemplateStyles/example.css|nocat=true}}
No style pages specified
<templatestyles src="Template:Mono/styles.css"/>{{#if:{{safesubst:#switch:
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|<templatestyles src="Template:Nowrap/styles.css"/>}}{{[[{{#if:|{{{SISTER}}}Template|Template}}:Uses TemplateStyles|Uses TemplateStyles]]{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||{{{7}}}}}{{#if:||...}}Template:)) {{Uses TemplateStylesTemplate:\sandbox|nocat=true}}
Categories
Template category
This template adds pages to [[:Category:Script error: No such module "Data".]] if the page is in the template namespace, and it is not on any of the subpages /doc, /sandbox, /sandbox2 or /testcases. You can specify a different category with the {{safesubst:#if:|<templatestyles src="Template:Mono/styles.css"/>}}{{safesubst:#if:{{safesubst:#switch: 1
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|<templatestyles src="Template:Nowrap/styles.css"/>}}<{{safesubst:#if:|span class="monospaced {{safesubst:#if:{{safesubst:#switch: 1
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|nowrap}}"|code {{safesubst:#if:{{safesubst:#switch: 1
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|class="nowrap"}}}}>|{{safesubst:#if:category|category=}}</{{safesubst:#if:|span|code}}> parameter, e.g. {{safesubst:#if:|<templatestyles src="Template:Mono/styles.css"/>}}{{safesubst:#if:{{safesubst:#switch: 1
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|<templatestyles src="Template:Nowrap/styles.css"/>}}<{{safesubst:#if:|span class="monospaced {{safesubst:#if:{{safesubst:#switch: 1
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|nowrap}}"|code {{safesubst:#if:{{safesubst:#switch: 1
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|class="nowrap"}}}}>|{{safesubst:#if:category|category=}}Uses list TemplateStyles</{{safesubst:#if:|span|code}}>. {{#if:Script error: No such module "Data".|
Error category
If no modules are specified, the transcluded page will be added to [[:Category:Script error: No such module "Data".]]. }}{{#if:Script error: No such module "Data".|
Protection level category
TemplateStyles should have the same protection level as the template they are used on. If a difference is detected, the transcluded page will be added to [[:Category:Script error: No such module "Data".]]. }}
Category suppression
To suppress all categories, use {{safesubst:#if:|<templatestyles src="Template:Mono/styles.css"/>}}{{safesubst:#if:{{safesubst:#switch: 1
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|<templatestyles src="Template:Nowrap/styles.css"/>}}<{{safesubst:#if:|span class="monospaced {{safesubst:#if:{{safesubst:#switch: 1
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|nowrap}}"|code {{safesubst:#if:{{safesubst:#switch: 1
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|class="nowrap"}}}}>|{{safesubst:#if:nocat|nocat=}}true</{{safesubst:#if:|span|code}}>. (As well as "true", the values "yes", "y", and "1" will also work.)
TemplateData
{{#switch:<translate></translate> |=
|no |n |false |0 = | = |¬ = |yes |y |true |1 = yes |#default = yes
}}|{{#ifexpr:{{#if:|{{#ifeq:Template:Uses TemplateStyles/doc|{{#switch:
|#default = | = {{#ifeq: | | Template:{{{docpage}}} | }}
}}|0|1}}|not{{#ifexpr: ( {{#ifeq:doc|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:uses templatestyles/doc|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|0}}}}|<templatestyles src="Module:Navbar/styles.css"/>
|#default = Uses TemplateStyles/doc | = {{#ifeq: | | Template:Uses TemplateStyles/doc | Uses TemplateStyles/doc }}
}}|<span style="" title="<translate nowrap> View this template</translate>">{{#if:|<translate> v</translate>|<translate> view</translate>}}]] · [[[:Template:Fullurl:]] <span style="" title="<translate nowrap> Discuss this template</translate>">{{#if:|<translate> d</translate>|<translate> talk</translate>}}]{{#if:|| · [{{fullurl:{{#switch:
|#default = Uses TemplateStyles/doc | = {{#ifeq: | | Template:Uses TemplateStyles/doc | Uses TemplateStyles/doc }}
}}|action=edit}} <span style="" title="<translate nowrap> Edit this template</translate>">{{#if:|<translate> e</translate>|<translate> edit</translate>}}]}}{{#if:1|]}}}}}} {{#if:||<translate> This is the [[<tvar name=1>Special:MyLanguage/Help:TemplateData</tvar>|TemplateData]] documentation for this template used by [[<tvar name=2>Special:MyLanguage/VisualEditor</tvar>|VisualEditor]] and other tools.</translate>}}
Uses TemplateStyles
{{#ifeq:doc|sandbox||{{#if:{{#ifexpr: (
{{#ifeq:doc|doc|1|0}} or ( {{#ifeq:{{#titleparts:template:uses templatestyles/doc|-1|-2}}|doc|1|0}} and {{#if:{{#translation:}}|1|0}} ) )|1|}}|[[Category:TemplateData documentation{{#translation:}}]]|[[Category:Templates using TemplateData{{#translation:}}]]}}}} | #default=
Script error: No such module "Template translation".
}} Script error: No such module "TNT".
See also
- {{Lua}}