Vorlage:Asbox/Doku

< Vorlage:Asbox
Version vom 21. Juli 2009, 02:54 Uhr von wikivoyage>Funandtrvl (copy-edit, rm live auto-categorizing parameters (hopefully))

This is the asbox or article stub box meta template. It is the standard template used for creating new or updating existing article stub box templates. It supports most, if not all, stub template styles, in place prior to 26 September 2007.

Basic usage

{{asbox
| image     = just the name of the image, e.g. Image.png - will be sized at 40x30px
| subject   = given before "article", e.g. "this *biographical* article is a stub"
| qualifier = given after "article" e.g. "the article *about a musician* is a stub"
| category  = just the name of the category to place tagged pages in, e.g. History stubs
}}

This simple usage should suffice for a great many stub templates. Additional parameters are described below for advanced use.

Full usage

{{asbox
| image     = Ambox style.png
| pix       = 
| subject   = 
| qualifier = 
| category  = 
| tempsort  = 
| category1 = 
| tempsort1 = 
| note      = 
}}

Parameters

icon or image

If the image is called with an icon template, icon is set to the full syntax of the template; that's the name of the template, plus any arguments (separated with | ), including the {{ and }} around it. If the image is called explicitly image is the name of the image :- pix will likely be required as well, the default value for pix is 40x30.

pix

The size of the image, only required if image is set and its size is not 40x30. Defensive programming suggests setting the value of pix even if it is 40x30.

subject and qualifier

This subject article qualifier is a stub...

Examples:

  • This geography article about a place in Rohan is a stub...
  • This elementary physics article is a stub...
  • This article about Rudolph the Red-nosed reindeer is a stub...

category

The stub category the articles should go in. Note that, unless the parameter tempsort is set (see below), the template will only include articles in the stub category.

tempsort

If exists the template will be put in its own category sorted as " " (space) followed by tempsort.

category1

An optional second stub category the articles should go in. Note the template will only include articles in the stub category, unless the parameter tempsort1 is set, in which case templates (in particular the stub template itself) will also be included - sorted with the value of " " (space) followed by tempsort1.

tempsort1

If exists the template will be put in its own second category sorted as " " (space) followed by tempsort1.

note

If exists the value will be added, as a "small" note, to the stub template.

Examples

Using image

{{Asbox 
 | image     = Ostfold_vapen.png
 | pix       = 30
 | subject   = [[Østfold]] location
 | qualifier = 
 | category  = Østfold geography stubs
}}

Appears as:

Based on {{Østfold-geo-stub}}

(category has been over-ridden to keep this page out of the stub category)

Using icon and category1

Using icon allows more flexibility in some circumstances than image and pix, since it can be used with templates. As of January 24, 2007, the new parser requires the {{ and }} around the used template, and a single | is used instead of {{!}} to separate the parameters. Old code relying on {{!}} will need to be updated:

{{Asbox
 | icon      = {{Soccer icon|Wales|50}}
 | subject   = [[biography|biographical]]
 | qualifier = related to Welsh [[association football]]
 | category  = Welsh football biography stubs
 | category1 = Welsh people stubs
 | tempsort  =       
}}

Appears as:

Based on {{Wales-footy-bio-stub}}

(category and category1 have been over-ridden to keep this page out of the stub categories)

Whatlinkshere

The page here should have a complete list of all templates using this template. This list can be compared with existing list of stub templates to identify new stub templates created out of process. The last entries will also be the most recently created items.

See also

There are seven metatemplates in the Module:Message box family:
  • {{Ambox}}, for messageboxes on article pages.
  • {{Cmbox}}, for messageboxes on category pages.
  • {{Imbox}}, for messageboxes on file (image) pages.
  • {{Tmbox}}, for messageboxes on talk pages.
  • {{Fmbox}}, for header and footer messageboxes.
  • {{Ombox}}, for messageboxes on other types of page.
  • {{Mbox}}, for messageboxes that are used in different namespaces and change their presentation accordingly.

Closely related metatemplates:

  • {{Asbox}}, for messageboxes in article stubs.
  • {{Dmbox}}, for messageboxes on disambiguation or set-index pages.
  • {{Ivmbox}}, a simple full-width box with default ivory background intended to frame important messages or notices.