Template:Class template: Difference between revisions

From stencil.wiki
No edit summary
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>
<noinclude>
<noinclude>
This template displays a message box on core class templates to warn users that they should only be used with the appropriate form—and adds these templates to [[:Category:Class templates]].
This template displays a message box on core class templates to warn users that they should only be used with the appropriate PageForm. It also adds them to [[Category:Class templates]].


==Usage==
== Usage ==
Include this template at the top of any top level class templates (e.g. [[Template:Place]], [[Template:Ink]], etc.). Provided fields fill out the class, form, and category names.
Provided fields fill out the class, form, and category names/links in the text of the message.
<pre>
<pre>
{{Class template|class=Ink|form=Ink|category=Inks}}
{{Class template|class=Ink|category=Inks}}
</pre>
</pre>
{{Class template|class=Ink|form=Ink|category=Inks}}
{{mbox
</noinclude><!--
--><includeonly>{{ambox
  | title='''Warning:''' Class template
  | title='''Warning:''' Class template
  | text=This is the main template for the ''{{{class|}}}'' class—it should only be used with the [[Form:{{{form|}}}]] PageForm to create or edit associated pages, and not invoked in other circumstances. Most of the content can be edited with the VisualEditor, but for best functionality please use the specified form. Pages which use this template are listed at [[:Category:{{{category|}}}]].
  | text=This is the main template for the ''Ink'' class—it should primarily be used with [[Form:Ink]] to create or edit associated pages, and not invoked in other circumstances. Most of the content ''can'' be edited with the VisualEditor, but for best functionality please use the specified form.<p>Pages which use this template are listed at [[:Category:Inks]].</p>
  | color_bar=#FFB511
  | color_bar=#FFB511
  | class=class-ambox
  | class=class-ambox
}}<!--
}}
--></includeonly>
 
<noinclude>
== TemplateData ==
<templatedata>
<templatedata>
{
{
Line 24: Line 21:
"label": "Class",
"label": "Class",
"description": "Name of the class.",
"description": "Name of the class.",
"example": "Ink",
"type": "string",
"type": "string",
"required": true
},
"form": {
"label": "Form",
"description": "Name of the form for use with this class (do not include the \"Form:\" namespace).",
"example": "Ink",
"required": true
"required": true
},
},
Line 37: Line 27:
"label": "Category",
"label": "Category",
"description": "Name of the category used with pages in this class (do not include the \"Category:\" namespace).",
"description": "Name of the category used with pages in this class (do not include the \"Category:\" namespace).",
"example": "Inks",
"type": "string",
"type": "string",
"required": true
"required": true
}
}
},
},
"description": "Used on top level class templates that should only be edited with the associated PageForm.",
"description": "Used on top level class templates that should only be edited with the associated form.",
"format": "inline"
"format": "inline"
}
}
</templatedata>
</templatedata>
</noinclude>
</noinclude><!--
--><includeonly>{{mbox
| title='''Warning:''' Class template
| text=This is the main template for the ''{{{class|}}}'' class—it should primarily be used with [[Form:{{{class|}}}]] to create or edit associated pages, and not invoked in other circumstances. Most of the content ''can'' be edited with the VisualEditor, but for best functionality please use the specified form.<p>Pages which use this template are listed at [[:Category:{{{category|}}}]].</p>
| color_bar=#FFB511
| class=class-ambox
}}[[Category:Class templates]]<!--
--></includeonly>

Latest revision as of 03:03, 18 December 2024

This template displays a message box on core class templates to warn users that they should only be used with the appropriate form—and adds these templates to Category:Class templates.

Usage

Provided fields fill out the class, form, and category names/links in the text of the message.

{{Class template|class=Ink|category=Inks}}
Warning: Class template
This is the main template for the Ink class—it should primarily be used with Form:Ink to create or edit associated pages, and not invoked in other circumstances. Most of the content can be edited with the VisualEditor, but for best functionality please use the specified form.

Pages which use this template are listed at Category:Inks.

TemplateData

Used on top level class templates that should only be edited with the associated form.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Classclass

Name of the class.

Stringrequired
Categorycategory

Name of the category used with pages in this class (do not include the "Category:" namespace).

Stringrequired