Template:Class/doc

{{Documentation subpage}}

{{high-use}}

{{cascade-protected template}}

{{Lua|Module:Class|Module:Class/definition.json}}

This template is used to show WP1.0 assessment ratings on WikiProject banners and other places. Because it wraps its contents in {{tag|td}} tags, it must be used inside {{tag|table}} tags.

Usage

  • {{class|grade}}
  • : Where grade is the classification of the article.
  • {{class|grade|image=yes}}
  • : {{para|image|yes}} Displays a small icon next to the grade description for all assessments (produced by {{tlx|class/icon}}).
  • : {{para|image|no}} does not ever display icons.
  • : {{para|image}} (blank or undefined) displays icons for FA, FL, A and GA classes only.
  • {{class|grade|category=category}}
  • : Define an alternative category link.
  • {{class|grade|header=yes}}
  • : By default the {{tlc|class}} template generates a table cell using the {{tag|td}} element. If the template is used in the header row of a sortable table, use {{para|header|yes}} so that the cell is constructed using the {{tag|th}} element. If used elsewhere than a header row, omit this parameter.

= Examples =

style="width:100%; background:transparent;"

|

{{class|FA}}

{{class|FA}}

{{class|FA|image=no}}

{{class|FA|image=no}}

{{class|FA|category=biography articles}}

{{class|FA|category=biography articles}}

{{class|B}}

{{class|B}}

{{class|B|image=yes}}

{{class|B|image=yes}}

{{class|B|category=mathematics articles}}

{{class|B|category=mathematics articles}}

TemplateData

{{TemplateData header}}

{

"description": "",

"params": {

"1": {

"label": "Grade",

"description": "The classification of the article",

"type": "string",

"required": true

},

"image": {

"label": "Image",

"description": "Set to 'yes' to display an icon; 'no' to not display an icon; or no value or blank to display an icon for FA, FL, A and GA classes only",

"type": "string",

"required": false

},

"category": {

"label": "Category",

"description": "An alternative category link",

"type": "string",

"required": false

},

"header": {

"label": "Header",

"description": "Set to 'yes' if the template is used in the header row of a sortable table, so that the cell is constructed using a \"th\" element rather than a \"td\" element",

"type": "string",

"required": false

}

}

}

See also

{{Grading scheme/doc/see also}}

{{Sandbox other||

Class

}}