Difference between revisions of "Template:Class/doc"

From blackwiki
Jump to navigation Jump to search
imported>PC78
m (→‎Examples: fixed properly)
imported>Vanisaac
m (→‎See also: clean up per WP:CAT#T and WP:AWBREQ add template:Sandbox other)
 
(36 intermediate revisions by 22 users not shown)
Line 1: Line 1:
 
{{Documentation subpage}}
 
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
+
<!-- Place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
 +
{{high-use|7,100,000|all-pages = yes}}
  
This template is used to show [[WP:1.0/A|WP1.0 assessment]] ratings on WikiProject banners and other places.
+
This template is used to show [[Wikipedia:Version 1.0 Editorial Team/Assessment|WP1.0 assessment]] ratings on WikiProject banners and other places.
  
=== Usage ===
+
== Usage ==
 +
* <code><nowiki>{{</nowiki>class|''grade''<nowiki>}}</nowiki></code>
 +
*: Where ''grade'' is the classification of the article.
 +
* <code><nowiki>{{</nowiki>class|''grade''|image=yes<nowiki>}}</nowiki></code>
 +
*: '''{{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.
 +
* <code><nowiki>{{</nowiki>class|''grade''|category=''category''<nowiki>}}</nowiki></code>
 +
*: Define an alternative category link.
 +
* <code><nowiki>{{</nowiki>class|''grade''|header=yes<nowiki>}}</nowiki></code>
 +
*: 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.
  
*<tt><nowiki>{{class|</nowiki>''grade''<nowiki>}}</nowiki></tt>
+
=== Examples ===
*:Where ''grade'' is the classification of the article.
 
*<tt><nowiki>{{class|</nowiki>''grade''<nowiki>|image=</nowiki>''yes''<nowiki>}}</nowiki></tt>
 
*:'''{{para|image|yes}}''' Displays a small icon next to the grade description for ''all'' assessments (produced by {{tlx|classicon}}).
 
*:'''{{para|image|no}}''' does not ever display icons.
 
*:'''{{para|image}}''' (blank or undefined) displays icons for '''FA'', '''FL''', '''A''' and '''GA''' classes only.
 
*<tt><nowiki>{{class|</nowiki>''grade''<nowiki>|category=</nowiki>''category''<nowiki>}}</nowiki></tt>
 
*:Define an alternative category link.
 
 
 
====Examples====
 
 
{| style="width:100%; background:transparent;"
 
{| style="width:100%; background:transparent;"
 
|
 
|
<tt><nowiki>{{class|FA}}</nowiki></tt>
+
<code><nowiki>{{class|FA}}</nowiki></code>
 
<table>{{class|FA}}</table>
 
<table>{{class|FA}}</table>
  
<tt><nowiki>{{class|FA|image=yes}}</nowiki></tt>
+
<code><nowiki>{{class|FA|image=no}}</nowiki></code>
<table>{{class|FA|image=yes}}</table>
+
<table>{{class|FA|image=no}}</table>
  
<tt><nowiki>{{class|FA|category=biography articles}}</nowiki></tt>
+
<code><nowiki>{{class|FA|category=biography articles}}</nowiki></code>
 
<table>{{class|FA|category=biography articles}}</table>
 
<table>{{class|FA|category=biography articles}}</table>
  
 +
<code><nowiki>{{class|B}}</nowiki></code>
 +
<table>{{class|B}}</table>
  
<tt><nowiki>{{class|B+}}</nowiki></tt>
+
<code><nowiki>{{class|B|image=yes}}</nowiki></code>
<table>{{class|B+}}</table>
+
<table>{{class|B|image=yes}}</table>
  
<tt><nowiki>{{class|B+|image=yes}}</nowiki></tt>
+
<code><nowiki>{{class|B|category=mathematics articles}}</nowiki></code>
<table>{{class|B+|image=yes}}</table>
+
<table>{{class|B|category=mathematics articles}}</table>
 
 
<tt><nowiki>{{class|B+|category=mathematics articles}}</nowiki></tt>
 
<table>{{class|B+|category=mathematics articles}}</table>
 
|
 
{| class="wikitable" style="float:right; text-align:center"
 
! colspan = "8"|Article classes
 
|-
 
{{class|FA|attr=colspan="2"|image=yes}}
 
{{class|FL|attr=colspan="2"|image=yes}}
 
{{class|A|attr=colspan="2"|image=yes}}
 
{{class|GA|attr=colspan="2"|image=yes}}
 
|-
 
| [[Template:FA-Class|class]]
 
| [[Template:FA-Class td|td]]
 
| [[Template:FL-Class|class]]
 
| [[Template:FL-Class td|td]]
 
| [[Template:A-Class|class]]
 
| [[Template:A-Class td|td]]
 
| [[Template:GA-Class|class]]
 
| [[Template:GA-Class td|td]]
 
|-
 
{{class|B|attr=colspan="2"|image=yes}}
 
{{class|C|attr=colspan="2"|image=yes}}
 
{{class|Start|attr=colspan="2"|image=yes}}
 
{{class|Stub|attr=colspan="2"|image=yes}}
 
|-
 
| [[Template:B-Class|class]]
 
| [[Template:B-Class td|td]]
 
| [[Template:C-Class|class]]
 
| [[Template:C-Class td|td]]
 
| [[Template:Start-Class|class]]
 
| [[Template:Start-Class td|td]]
 
| [[Template:Stub-Class|class]]
 
| [[Template:Stub-Class td|td]]
 
|-
 
! colspan = "8"|Other classes
 
|-
 
{{class|Disambig|attr=colspan="2"|image=yes}}
 
{{class|Portal|attr=colspan="2"|image=yes}}
 
{{class|Redirect|attr=colspan="2"|image=yes}}
 
{{class|Project|attr=colspan="2"|image=yes}}
 
|-
 
| [[Template:Disambig-Class|class]]
 
| [[Template:Disambig-Class td|td]]
 
| [[Template:Portal-Class|class]]
 
| [[Template:Portal-Class td|td]]
 
| [[Template:Redirect-Class|class]]
 
| [[Template:Redirect-Class td|td]]
 
| [[Template:Project-Class|class]]
 
| [[Template:Project-Class td|td]]
 
|-
 
{{class|Category|attr=colspan="2"|image=yes}}
 
{{class|Template|attr=colspan="2"|image=yes}}
 
{{class|List|attr=colspan="2"|image=yes}}
 
{{class|File|attr=colspan="2"|image=yes}}
 
|-
 
| [[Template:Category-Class|class]]
 
| [[Template:Category-Class td|td]]
 
| [[Template:Template-Class|class]]
 
| [[Template:Template-Class td|td]]
 
| [[Template:List-Class|class]]
 
| [[Template:List-Class td|td]]
 
| [[Template:File-Class|class]]
 
| [[Template:File-Class td|td]]
 
|-
 
{{class|NA|attr=colspan="2"|image=yes}}
 
{{class||attr=colspan="2"|image=yes}}
 
<td colspan = "4" rowspan="2" />
 
|-
 
| [[Template:NA-Class|class]]
 
| [[Template:NA-Class td|td]]
 
| [[Template:-Class|class]]
 
| [[Template:-Class td|td]]
 
|-
 
! colspan=8 | Non-standard grades
 
|-
 
{{class|Current|attr=colspan="2"}}
 
{{class|Future|attr=colspan="2"}}
 
{{class|Merge|attr=colspan="2"}}
 
{{class|Needed|attr=colspan="2"}}
 
|-
 
| [[Template:Current-Class|class]]
 
| [[Template:Current-Class td|td]]
 
| [[Template:Future-Class|class]]
 
| [[Template:Future-Class td|td]]
 
| [[Template:Merge-Class|class]]
 
| [[Template:Merge-Class td|td]]
 
| [[Template:Needed-Class|class]]
 
| [[Template:Needed-Class td|td]]
 
 
|}
 
|}
|}
 
 
=== See also ===
 
  
*[[Wikipedia:Version 1.0 Editorial Team/Assessment]]
+
==TemplateData==
*[[Template:Grading scheme]]
+
{{TemplateData header}}
*[[Template:WPBannerMeta]]
+
<TemplateData>
*[[Template:Classicon]]
+
{
*[[Template:Classcol]]
+
        "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>
  
<includeonly>
+
==See also==
<!-- CATEGORIES AND INTERWIKIS BELOW THIS LINE PLEASE -->
+
{{Grading scheme/doc/see also}}
 +
* [[Wikipedia:Version 1.0 Editorial Team/Assessment]]
 +
* [[Template:WPBannerMeta]]
  
</includeonly>
+
<includeonly>{{Sandbox other||
 +
<!-- Categories below this line, please; interwikis at Wikidata -->
 +
[[Category:Classification templates| Class]]
 +
}}</includeonly>

Latest revision as of 15:06, 24 April 2020

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 FA, FL, A and GA 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|FA}}

{{class|FA|image=no}}

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

{{class|B}}

{{class|B|image=yes}}

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

TemplateData

This is the TemplateData documentation for this template used by VisualEditor and other tools; see the monthly parameter usage report for this template.

TemplateData for Class

Template parameters

ParameterDescriptionTypeStatus
Grade1

The classification of the article

Stringrequired
Imageimage

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

Stringoptional
Categorycategory

An alternative category link

Stringoptional
Headerheader

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

Stringoptional

See also

Standard class types
{{class|FA}} {{class|FL}} {{class|FM}} {{class|A}}
{{class|GA}} {{class|B}} {{class|C}} {{class|Start}}
{{class|Stub}} {{class|List}} {{class|NA}} {{class|Unassessed}}
Non-standard class types
{{class|Current}} {{class|Future}} {{class|SIA}} {{class|Deferred}}
{{class|AL}} {{class|BL}} {{class|CL}} {{class|SL}}
{{class|Book}} {{class|Category}} {{class|Disambig}} {{class|Draft}}
{{class|File}} {{class|Merge}} {{class|Needed}} {{class|Portal}}
{{class|Project}} {{class|Redirect}} {{class|Template}} {{class|User}}
Importance types
 Top   High   Mid   Low 
{{importance|Top}} {{importance|High}} {{importance|Mid}} {{importance|Low}}
 Bottom   NA   ??? 
{{importance|Bottom}} {{importance|NA}} {{importance|Unknown}}
Class
Importance
Hybrid
Others
Tool to add multiple templates to quality assessment pages