Template:Class/doc

From the AARoads Wiki: Read about the road before you go
Jump to navigation Jump to search

This template is used to show WP1.0 assessment ratings on WikiProject banners and other places.

Usage

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

Examples

{{class|A}}

 A

{{class|A|image=no}}

A

{{class|A|category=U.S. state highway articles}}

 A

{{class|B}}

 B

{{class|B|image=yes}}

 B

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

 B

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Class in articles based on its TemplateData.

TemplateData for Class

<TemplateData> {

       "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
               }
       }

} </TemplateData>

See also

Standard class types
 A  B C D E
{{Class|A}} {{Class|B}} {{Class|C}} {{Class|D}} {{Class|E}}
 AL  BL CL DL EL
{{Class|AL}} {{Class|BL}} {{Class|CL}} {{Class|DL}} {{Class|EL}}
List Future NA ???
{{Class|List}} {{Class|Future}} {{Class|NA}} {{Class|Unassessed}}
Non-standard class types
Annex Disambig Draft File Help
{{Class|Annex}} {{Class|Disambig}} {{Class|Draft}} {{Class|File}} {{Class|Help}}
Module Project Template
{{Class|Module}} {{Class|Project}} {{Class|Template}}

Class