Jump to content

Template:Article attribute decoration/doc

From Wikipedia, the free encyclopedia

Emits an icon, symbol, or text decoration for a given attribute of an article. This is geared towards WikiProject lists or tables which may want to economically and easily decorate article names with icons displaying some of its attributes. Lightweight tokens are available instead of icon images for pages with heavy usage.

Usage[edit]

{{aad|type|ArticleName}}
{{aad|type|ArticleName|raw=y|style=css string}}

Parameters[edit]

There are two positional parameters, both required (both with a named alias) and one optional named parameters:

  • |1= – a token that identifies an article attribute like aq (for article quality), or redir (for redirect); full list below; (alias type)
  • |2= – name of the article whose attribute specified in param 1 should be displayed; (alias article)
  • |style= – if present, appends user-defined style to the end of the predefined stylesheet.

Type values[edit]

Parameter values for type come in two flavors; the regular ones just following, which cause a small, inline image to be emitted, such as the icon emitted for a page which is a redirect, when |1=redirect is chosen. Lightweight (non-image, character-based) tokens are available at the bottom of this section.

  • redirect displayed if the article name is a redirect (value aliases: r, red)
    • poss Redirect 'with possibilities: applies to redirects designated as being a likely notable topic and having possibilities of expansion into a standalone article; (value aliases: possibilities, N, notable, notability)
  • quality – article assessment quality symbol , , , , , (stub) displayed for the article. (value aliases: aq, rating, assessment)
  • length – article length bar, such as 288k (value alias: len)
  • contentious – displays contentious for articles whose Talk page contains one of the Contentious topics templates (or the old Ds templates). (value alias: cont )
  • protection – protection level icon: unprotected, semi-protected, extended protection, and fully protected for unprotected, semi-protected, extended protected, and full protection, respectively. (value aliases:p, prot, padlock)

Lightweight param values that display from one or two characters instead of an image are available, for pages containing heavy use of this template where the total size of all the icon images might be a problem; (the length field may be up to 7 characters, e.g. '123,456'):

  • redirectraw displayed if the article name is a redirect (value aliases: rraw, redraw)
    • possraw – Ⓝ redirect with possibilities; (value aliases: possraw, Nraw, notableraw)
  • qualityraw – article assessment quality token (FA, GA, A, B, C, stub) is displayed for the article. (value aliases: aqraw, ratingraw)
  • lengthraw – actual article length in bytes displayed; (value alias: lenraw )
  • contentiousraw – displays for articles on Contentious topics . (value alias: contraw )
  • protraw – protection level tokens ( 🔒, 🔒, 🔒‼!) displayed: for , semi-protected, extended protected, and fully protected , respectively. (value aliases:praw, protraw,protectionraw, padlockraw)

Notes[edit]

If the article passed in param |2= is a redirect, the icon displayed is that which corresponds to the attribute of the article targeted by the redirect. So for example, if you request the length of German people, the icon returned will be for the length of the article "Germans", not the length of the redirect page "German people". The only exception is for |type=redirect, which tests the page name you pass, not the page it redirects to.

If you want all possible types, use {{Aad/all}}.

Examples[edit]

Click [show] to view examples.
  • {{aad|aq|World War I}}
  • {{aad|aqraw|World War I}}
  • {{aad|aq|Tang dynasty}}
  • {{aad|aqraw|Tang dynasty}}FA
  • {{aad|aq|London}}
  • {{aad|aq|World War II}}
  • {{aad|cont|Transphobia}}contentious
  • {{aad|cont|Translation}}
  • {{aad|contraw|Transphobia}}
  • {{aad|cont|Translation}}
  • {{aad|r|WW2}}
  • {{aad|rraw|WW2}}
  • {{aad|len|WW2}} 255k
  • {{aad|lenraw|WW2}}255kb
  • {{aad|poss|Bipolar spectrum}}
  • {{aad|possraw|Bipolar spectrum}}
  • {{aad|poss|Bipolar disorder}}
  • {{aad|prot|Ilhan Omar}}semi-protected
  • {{aad|protraw|Ilhan Omar}}🔒
  • {{aad|prot|Geometry}}semi-protected
  • {{aad|protraw|Geometry}}🔒
  • {{aad|prot|Pietra-di-Verde}}unprotected
  • {{aad|protraw|Pietra-di-Verde}}д
  • {{aad|vital|Logic}}2
  • {{aad|vitalraw|Qin dynasty}}4
  • {{aad/all|Transphobic}} 134kcontentioussemi-protected5
  • {{aad/all|Agender|raw=y}}95.4kb🔒5
  • {{aad|testraw}}
  • {{aad|testraw|style=color:green; font-size:12px; text-decoration:red wavy underline}}
  • {{aad|legend}}
    • Article quality:
    • Contentious: contentious
    • Redirect:
    • Redirect with possiblities:
    • Protection: fully protected extended protection semi-protected unprotected
    • Vital: