L'Abri
Advertisement
L'Abri
3 714
pages
Documentation de modèle (Pour le modèle ci-dessus, parfois caché ou invisible)

Méta-modèle utilisé pour construire les modèles d'infobox. Les infoboxes sont des tableaux de format fixe conçus pour être ajoutés dans le coin supérieur droit des articles, afin de représenter de façon consistante un sommaire du sujet de l'article.

Ce modèle peut supporter jusqu'à 44 lignes et autant de groupes, ainsi que jusqu'à 4 colonnes. Chaque ligne peut posséder un nombre variable de colonnes et de groupes pouvant être rendus "collapsible" (déroulants). Des conditions spécifiques peuvent être renseignées pour chaque ligne. De plus, le modèle supporte jusqu'à 5 images dans la zone principale de l'image et calcule de façon dynamique la largeur/hauteur appropriée pour chacune d'elle.

Utilisation

{{Infobox
|jeux               ={{{jeux|}}}
|title              ={{{nom|}}}
|subtitle           ={{{subtitle|}}}
|supertitle         =exemple
|supertitle link    =exemples
|icon               ={{{icon|}}}
|main image1        ={{{image|}}}
|main image1 size   ={{{image size|}}}
|main image desc    ={{{image desc|}}}
|footer             ={{{footer|}}}
|group1             ={{{group1|}}}
|label1-1           ={{{label1|}}}
|content1-2         ={{{content1|}}}
}}

La plupart des paramètres devraient être passés par les Infoboxes "finales" (c'est-à-dire celles utilisées directement dans les articles).

Explications générales

  • Une certaine ligne contient soit un group, une image ou du content et des cases de label; ces 3 options sont mutuellement exclusives. Par exemple, si vous spécifiez le group1, l'image1 et le label1-1, seul le group1 s'affichera. Ordre de priorité : group > image > label > content.
  • La disposition pour chaque ligne est automatiquement générée sur les cellules spécifiées de la ligne elle-même et le groupe à laquelle elle appartient. Il est possible d'avoir des lignes possédant un nombre de colonnes différent à l'intérieur du même groupe; les cases de la ligne avec le moins de colonnes s'étendra ensuite sur plusieurs colonnes, en fonction du nombre de colonnes utilisées dans cette ligne.
    Par exemple, si une ligne dans un groupe donné possède 4 colonnes et une autre ligne seulement 2, la disposition de la deuxième ligne variera en fonction du nombre de colonnes utilisées :
    • Si la première et la dernière cases sont utilisées, la première case (de la deuxième ligne) s'étendra sur les colonnes 1, 2 et 3 (de la première ligne).
    • Si la première et la seconde cases sont utilisées, la seconde case s'étendra sur les colonnes 2, 3 et 4.
    • Si la première et la troisième cases sont utilisées, la première case s'étendra sur les colonnes 1 et 2 tandis que la deuxième case s'étendra sur les colonnes 3 et 4.

Paramètres

Les termes utilisés dans la description des paramètres :

  • |example = value
    Defined and not empty: A parameter is "defined and not empty" if it has been set to any value. In the example on the right, the parameter example is defined and not empty.
  • |example =
    Defined and empty: A parameter is "defined and empty" if it is present on the page but has been set to no value. In the example on the right, the parameter example is defined and empty.
  •  
    Undefined: A parameter is "undefined" if it is not present on the page. In the example on the right, the parameter example is undefined.
  • |example = @word
    Magic word: Magic words are terms which - when set as a parameter value - have a special effect. They are usually prefixed with an "@" in order to differentiate them from normal parameter values. In the example on the right, the parameter example is set to the magic word "@word".


Requis
Nom ?
Condition for corresponding row. If a cond is defined and empty, the row is not shown. If a cond is defined and not empty, the row is shown. If a cond is undefined, the row is shown based on the default for its row type:
  • group rows: Only displayed if group is defined, not set to "@hide" and there are rows shown (not only specified) in the group.
  • image rows: Only displayed if image is defined and not set to "@hide".
  • content/label rows: If the row contains content cells, it is shown if at least one of the content cells is defined, not empty and not set to "@hide". If the row contains only label cells, it is shown if at least one of the label cells is defined, not empty and not set to "@hide".
Requis
Nom ?
Column widths in percent, separated by commas (e.g. "50, 50"). Only applied to groups where the number of specified widths matches the number of columns in said group (e.g. if two widths are specified, only groups with two columns will be affected); for groups with more or less columns, the default widths are used.
Requis
Nom ?
Column widths in percent, separated by commas (e.g. "50, 50"). Only applied if the number of specified widths matches the number of columns in the group; otherwise colwidths (if that has a matching number of widths) or default widths are used. Overrides general colwidths parameter for the specific group.
Requis
Nom ?
Content of corresponding cell. The first number in the parameter name indicates the row and the second number stands for the column (numbered from left to right).

Magic words:

  • @hide: If all defined content cells in a row are set to "@hide", the row is not shown regardless of other conditions or options.
Requis
Nom ?
Tooltip for corresponding cell, i.e. text which is displayed if a reader moves his/her mouse over the cell.
Requis
Nom ?
Text of the footer, i.e. a row at the very bottom of the infobox.
Requis
Nom ?
Game abbreviation(s); for accepted abbreviations please see {{abr}}. Multiple abbreviations can be specified if separated by comma (,). These are used to create dynamic links for supertitle. For usage details, please see supertitle link below.
Requis
Nom ?
Content of corresponding cell, with the number indicating the row.

Specifying a group row creates a new group (and a header), and all rows below it belong to that group until another group field is specified. For example, if you set group1, content2-1, image3, group4 and label5-1, row 2 & row 3 belong to group 1 and row 5 belongs to group 4.

All rows above the first specified group belong to group 0. For example, if you set image1, content2-1, image3, group4 and label5-1, row 2 & row 3 belong to group 0 and row 5 belongs to group 4.

Magic words:

  • @hide: Creates a group without a visible header.
Requis
Nom ?
File name of icon (without "File:"), i.e. the small image which is displayed in the top right corner of the main image area.
Requis
Nom ?
Offset for icon in pixels, i.e. the icon is moved "upwards" by the specified amount of pixels. The maximum value is "icon size-specified height + 5".

Magic words:

  • @outside: Icon is placed completely outside (above) the main image area.
Requis
Nom ?
Size of icon in pixels. If no height/width is specified or the specified value exceeds the limit of 40px, the default icon height/width is used.
Requis
Nom ?
File name of image (without "File:") to be displayed in corresponding cell, with the number indicating the row. If an image has been specified but has not been filled in, an "upload image" button will be displayed instead, prompting users to upload an image with a pre-defined file name (see image# default).

Magic words:

  • @hide: Hides the image (or "upload image" button) regardless of other conditions or options.
Requis
Nom ?
The file name (without "File:") which is suggested when uploading an image via the "upload image" button in the corresponding cell. It is recommended to make this depend on {{PAGENAME}}.
Requis
Nom ?
Description for the corresponding image, displayed below the image.
Requis
Nom ?
Size for corresponding image in pixels. If the width of the image exceeds infobox width, the default width is used instead.
Requis
Nom ?
Content of corresponding cell. The first number in the parameter name indicates the row and the second number stands for the column (numbered from left to right).

Magic words:

  • @hide: If there are only label cells defined in a given row and all of these are set to "@hide", the row is not shown regardless of other conditions or options.
Requis
Nom ?
Tooltip for corresponding cell, i.e. text which is displayed when a reader moves his/her mouse over the cell.
Requis
Nom ?
Maximum amount of main images displayed per row. If the number of specified main images exceeds this value, a second (and if necessary, a third/fourth/fifth) row is created. For example, if main image columns is set to "3" and there are 2 main images, they will be displayed in one row; if there are 4 main images, the 4th image will be displayed in a second row.
Requis
Nom ?
The file name (without "File:") which is suggested when uploading an image via the "upload image" button in the main image area. It is recommended to make this depend on {{PAGENAME}}.
Requis
Nom ?
Description for the main image area, displayed below the images.
Requis
Nom ?
File name(s) of main image(s) (without "File:"), i.e. the images displayed directly below the infobox title. If more than one image is used, they are displayed in a configurable amount of rows (see main image columns) and their default sizes are adapted accordingly. If no main image has been specified, an "upload image" button will be displayed instead, prompting users to upload an image with a pre-defined file name (see main image default). options can be used to disable the "upload image" button.

Magic words:

  • @hide: If all defined main image parameters are set to "@hide", the main image area (or "upload image" button) is not shown regardless of other conditions or options.
Requis
Nom ?
Size for corresponding main image. By default, this size depends on the number of specified main images and the amount of main image columns. If the combined width of all main images exceeds infobox width, images which are bigger than the default are reduced to default width.
Requis
Nom ?
This parameter allows to specify options which apply to the infobox itself or all groups inside. Multiple options can be specified at once; simply separate them with commas (,).

Available choices:

  • collapsedgroups: This makes all groups within the infobox collapsible and collapsed on page load. Can be overriden for individual groups by setting the group-specific option parameter (see below) to "uncollapsed".
  • collapsiblegroups: This makes all groups within the infobox collapsible and uncollapsed on page load. Can be overriden for individual groups by setting the group-specific option parameter (see below) to "nocollapse".
  • imageoptional: If set, having no main image specified will not result in an "upload image" button being displayed.
Requis
Nom ?
This parameter allows to specify options which apply to the corresponding group of rows. For example, options4 applies to all cells which belong to group4. Multiple options can be specified at once; simply separate them with commas (,). Group-specific options override options set for the whole infobox.

Available choices:

  • collapsible, nocollapse, uncollapsed: These options control the collapse behaviour of the group. They are mutually exclusive.
    • collapsed means the group is collapsible and collapsed on page load.
    • collapsible/uncollapsed mean the group is collapsible and uncollapsed on page load.
    • nocollapse means the group is not collapsible. This is the default setting.
Requis
Nom ?
Default size in pixels for images in image rows. If the specified width exceeds infobox width, the default width is used instead; if no height is specified, the default height is used instead.
Requis
Nom ?
Size of main image area in pixels, i.e. the total space available for all main images. This is used as basis for calculating the default width of the individual main images. If the specified width exceeds infobox width, the default width is used instead; if no height is specified, the default height is used instead. main image# size overrides this default for the corresponding image.
Requis
Nom ?
Sets the term the page is sorted under when displayed in categories ({{DEFAULTSORT:}}).
Requis
Nom ?
Text in small font below infobox title.
Requis
Nom ?
Text in small font above infobox title. Supertitles can be created dynamically by using the games parameter. For details, see supertitle link below.
Requis
Nom ?
This parameter links the supertitle to an overview page (like Weapon). When used in conjunction with the games parameter, it can be used to dynamically create links to game-specific overview pages (like Fallout 3 weapons). For the exact behaviour please see {{abrlien}}. This is useful if an infobox template is used for multiple games and you want it to link to the correct overview pages depending on which game it is used for. For example, setting supertitle to "weapon" and supertitle link to "weapons", you can then let the editor in the respective article specify the games parameter and it will link to the correct overview page (e.g. "Fallout 3 weapons" if the editor enters "FO3").
Requis
Nom ?
Main title/"headline" of the infobox. By default, the name of the current page without any disambiguation suffixes (i.e. terms in brackets at the end) is used.
Requis
Nom ?
Width of the infobox in pixels. In order to achieve a standardized look across all infoboxes, infoboxes should only be resized if absolutely necessary .

Style parameters

All style options should be used sparingly as they can lead to visual inconsistencies. Some examples of useful styles:

  • Changing background color: background-color: #123456; (accepts HTML color names or RGB hex triplets)
  • Changing (horizontal) text-alignment: text-align: center; (accepts "center", "justify", "left", "right")
  • Changing vertical text-alignment: vertical-align: middle; (accepts "bottom", "middle", "top")


Requis
Nom ?
Specifies CSS styles to apply to the corresponding content cell. For example, content10-3 style applies to the cell of content10-3 etc.
Requis
Nom ?
Specifies CSS styles to apply to the footer cell.
Requis
Nom ?
Specifies CSS styles to apply to the corresponding group cell. For example, group6 style applies to the cell of group6 etc.
Requis
Nom ?
Specifies CSS styles to apply to the icon.
Requis
Nom ?
Specifies CSS styles to apply to the cell with the corresponding image. For example, image9 style applies to the cell of image9 etc.
Requis
Nom ?
Specifies CSS styles to apply to the corresponding label cell. For example, label20-4 style applies to the cell of label20-4 etc.
Requis
Nom ?
Specifies CSS styles to apply to the corresponding main image. For example, main image3 style applies to main image3 etc.
Requis
Nom ?
Specifies CSS styles to apply to every cell in the whole infobox except for the title cell.
Requis
Nom ?
Specifies CSS styles to apply to all cells within the corresponding group of cells. For example, style3 applies to all cells which belong to group3 etc.
Requis
Nom ?
Specifies CSS styles to apply to all cells of a certain type. For example, style contents applies to all content cells and so forth.
Requis
Nom ?
Specifies CSS styles to apply to a certain type of cells within the corresponding group of cells. For example, style contents5 applies to all content cells which belong to group5 etc.
Requis
Nom ?
Specifies CSS styles to apply to the title cell.

Examples

Simple

{{Infobox
|main image1        =Wiki.png
|main image1 size   =100x100px
|label1-1           =Label 1-1
|content1-2         =Content 1-2
|image2             =Wiki-wordmark.png
|label3-1           =Label 3-1
|content3-2         =Content 3-2
}}

Infobox with groups

{{Infobox
|main image1        =Wiki.png
|main image1 size   =100x100px
|group1             =Group 1
|label2-1           =Label 2-1
|content2-2         =Content 2-2
|group3             =Group 3
|label4-1           =Label 4-1
|content4-2         =Content 4-2
}}

Infobox with multiple columns

{{Infobox
|main image1        =Wiki.png
|main image1 size   =100x100px
|label1-1           =Label 1-1
|content1-2         =Content 1-2
|content1-3         =Content 1-3
|content1-4         =Content 1-4
|content2-1         =Content 2-1
|content2-3         =Content 2-3
}}

Infobox with collapsible groups

{{Infobox
|options            =collapsiblegroups
|main image1        =Wiki.png
|main image1 size   =100x100px
|group1             =Group 1
|label2-1           =Label 2-1
|content2-2         =Content 2-2
|group3             =Group 3
|label4-1           =Label 4-1
|content4-2         =Content 4-2
}}

Infobox with collapsible and non-collapsible groups

{{Infobox
|options            =collapsiblegroups
|main image1        =Wiki.png
|main image1 size   =100x100px
|group1             =Group 1
|label2-1           =Label 2-1
|content2-2         =Content 2-2
|group3             =Group 3
|options3           =nocollapse
|label4-1           =Label 4-1
|content4-2         =Content 4-2
}}

Infobox with multiple main images

{{Infobox
|options            =collapsiblegroups
|main image1        =Wiki.png
|main image2        =Wiki-wordmark.png
|main image3        =Wiki.png
|main image4        =Wiki-wordmark.png
|main image5        =Wiki.png
|label1-1           =Label 1-1
|content1-2         =Content 1-2
|label2-1           =Label 2-1
|content2-2         =Content 2-2
}}

Infobox with all main images in one row

{{Infobox
|options            =collapsiblegroups
|main image1        =Wiki.png
|main image2        =Wiki-wordmark.png
|main image3        =Wiki.png
|main image4        =Wiki-wordmark.png
|main image5        =Wiki.png
|main image columns =5
|label1-1           =Label 1-1
|content1-2         =Content 1-2
|label2-1           =Label 2-1
|content2-2         =Content 2-2
}}

Copy/paste

{{Infobox
|games              ={{{games|}}}
|title              ={{{name|}}}
|subtitle           ={{{subtitle|}}}
|supertitle         =
|supertitle link    =
|icon               ={{{icon|}}}
|icon offset        ={{{icon offset|}}}
|main image1        ={{{image|}}}
|main image1 size   ={{{image size|}}}
|main image2        ={{{image2|}}}
|main image2 size   ={{{image2 size|}}}
|main image3        ={{{image3|}}}
|main image3 size   ={{{image3 size|}}}
|main image4        ={{{image4|}}}
|main image4 size   ={{{image4 size|}}}
|main image5        ={{{image5|}}}
|main image5 size   ={{{image5 size|}}}
|main image desc    ={{{image desc|}}}
|footer             ={{{footer|}}}
|group1             =
|label1-1           =
|content1-2         ={{{|}}}
|group2             =
|label2-1           =
|content2-2         ={{{|}}}
|group3             =
|label3-1           =
|content3-2         ={{{|}}}
|group4             =
|label4-1           =
|content4-2         ={{{|}}}
|group5             =
|label5-1           =
|content5-2         ={{{|}}}
|group6             =
|label6-1           =
|content6-2         ={{{|}}}
|group7             =
|label7-1           =
|content7-2         ={{{|}}}
|group8             =
|label8-1           =
|content8-2         ={{{|}}}
|group9             =
|label9-1           =
|content9-2         ={{{|}}}
|group10            =
|label10-1          =
|content10-2        ={{{|}}}
|group11            =
|label11-1          =
|content11-2        ={{{|}}}
|group12            =
|label12-1          =
|content12-2        ={{{|}}}
|group13            =
|label13-1          =
|content13-2        ={{{|}}}
|group14            =
|label14-1          =
|content14-2        ={{{|}}}
|group15            =
|label15-1          =
|content15-2        ={{{|}}}
|group16            =
|label16-1          =
|content16-2        ={{{|}}}
|group17            =
|label17-1          =
|content17-2        ={{{|}}}
|group18            =
|label18-1          =
|content18-2        ={{{|}}}
|group19            =
|label19-1          =
|content19-2        ={{{|}}}
|group20            =
|label20-1          =
|content20-2        ={{{|}}}
|group21            =
|label21-1          =
|content21-2        ={{{|}}}
|group22            =
|label22-1          =
|content22-2        ={{{|}}}
|group23            =
|label23-1          =
|content23-2        ={{{|}}}
|group24            =
|label24-1          =
|content24-2        ={{{|}}}
|group25            =
|label25-1          =
|content25-2        ={{{|}}}
|group26            =
|label26-1          =
|content26-2        ={{{|}}}
|group27            =
|label27-1          =
|content27-2        ={{{|}}}
|group28            =
|label28-1          =
|content28-2        ={{{|}}}
|group29            =
|label29-1          =
|content29-2        ={{{|}}}
|group30            =
|label30-1          =
|content30-2        ={{{|}}}
|group31            =
|label31-1          =
|content31-2        ={{{|}}}
|group32            =
|label32-1          =
|content32-2        ={{{|}}}
|group33            =
|label33-1          =
|content33-2        ={{{|}}}
|group34            =
|label34-1          =
|content34-2        ={{{|}}}
|group35            =
|label35-1          =
|content35-2        ={{{|}}}
|group36            =
|label36-1          =
|content36-2        ={{{|}}}
|group37            =
|label37-1          =
|content37-2        ={{{|}}}
|group38            =
|label38-1          =
|content38-2        ={{{|}}}
|group39            =
|label39-1          =
|content39-2        ={{{|}}}
|group40            =
|label40-1          =
|content40-2        ={{{|}}}
|group41            =
|label41-1          =
|content41-2        ={{{|}}}
|group42            =
|label42-1          =
|content42-2        ={{{|}}}
|group43            =
|label43-1          =
|content43-2        ={{{|}}}
|label44-1          =
|content44-2        ={{{|}}}
}}

Technical

  • This template is fairly complicated. Editing it requires a good understanding of parser functions and wiki syntax.
  • Standardized documentation for templates based on this one:
    • {{Infobox/doc/standard}}
Documentation extraite depuis Modèle:Infobox/doc.
Advertisement