Modèle:Infobox/Sous-titre optionnel/Documentation
Aller à la navigation
Aller à la recherche
Modèle:Documentation modèle vue directement
Ce modèle permet de réaliser une infobox V2 à partir de briques. La brique {{Infobox/Sous-titre optionnel}} sert à ajouter un sous-titre dans une infobox. Le sous-titre est optionnel car il n'apparaît que si le ou les paramètres renseignés dans le troisième paramètre de ce modèle sont remplis.
Syntaxe
Copiez et collez ceci dans votre article.
{{Infobox/Début}}
{{Infobox/Sous-titre optionnel|Nom du sous-titre|Couleur|Le ou les paramètres déclanchant l'apparition}}
{{Infobox/Fin}}
Paramètre
- Paramètre 1 : Il sert à indiquer le nom du sous-titre comme par exemple : {{Infobox/Sous-titre optionnel|Administration}}
- Paramètre 2 : Il sert à indiquer la couleur du fond du sous-titre comme par exemple : {{Infobox/Sous-titre optionnel|Administration|#E1E1E1}}.
- Paramètre 3 : Il sert à indiquer le ou les paramètres déclanchant l'apparition du séparateur dans l'infobox comme par exemple : {{Infobox/Sous-titre optionnel|Administration|#E1E1E1|France}}.
Exemple
Exemple simple
- Exemple avec un paramètre
Modèle:Infobox/LégendeModèle:Infobox/Début tableauModèle:Infobox/Ligne tableau mixte optionnelModèle:Infobox/Fin tableau
| Titre | |
240 |
|
| Administration | |
|---|---|
{{Infobox/Début}}
{{Infobox/Titre|Titre}}
{{Infobox/Image|defaut.svg|240}}
{{Infobox/Légende|Une légende portant sur mon image}}
{{Infobox/Sous-titre optionnel|Administration|#E1E1E1|France}}
{{Infobox/Début tableau}}
{{Infobox/Ligne tableau mixte optionnel|Pays|France}}
{{Infobox/Fin tableau}}
{{Infobox/Fin}}
- Exemple sans un paramètre
Modèle:Infobox/LégendeModèle:Infobox/Début tableauModèle:Infobox/Ligne tableau mixte optionnelModèle:Infobox/Fin tableau
| Titre | |
240 |
|
| Administration | |
|---|---|
{{Infobox/Début}}
{{Infobox/Titre|Titre}}
{{Infobox/Image|defaut.svg|240}}
{{Infobox/Légende|Une légende portant sur mon image}}
{{Infobox/Sous-titre optionnel|Administration|#E1E1E1|}}
{{Infobox/Début tableau}}
{{Infobox/Ligne tableau mixte optionnel|Pays|}}
{{Infobox/Fin tableau}}
{{Infobox/Fin}}
Exemple au sein d'un modèle
{{Infobox/Début}}
{{Infobox/Titre|{{{nom|{{PAGENAME}}}}}|#E1E1E1|entete defaut}}
{{Infobox/Image
|{{{image|}}}|{{#if:{{{légende|}}}|{{{légende|}}}|Image représentant l'évènement}}|{{#if:{{{image-taille|}}}|{{{image-taille}}}px|250px}}
}}
{{Infobox/Légende
|{{{légende|}}}
}}
{{Infobox/Sous-titre optionnel|{{{paramètre1|}}}{{{paramètre2|}}}|#E1E1E1|}}
{{Infobox/Début tableau}}
{{Infobox/Ligne tableau mixte optionnel
|Pays|{{{paramètre1|}}}
}}
{{Infobox/Ligne tableau mixte optionnel
|Pays|{{{paramètre2|}}}
}}
{{Infobox/Fin tableau}}
{{Infobox/Fin}}