Modèle:Infobox/Sous-titre optionnel/Documentation

De Lagny-sur-Marne Wiki
Aller à : navigation, rechercher

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

<td colspan="2" style="text-align:center; line-height: 1.5em;">Image illustrative de l'article Infobox/Sous-titre optionnel/Documentation
240</td> </tr> <tr> Modèle:Infobox/Légende <th colspan="2" style="padding:4px;text-align:center;background-color:#France;color:#000000">Administration</th></tr> <tr> Modèle:Infobox/Début tableauModèle:Infobox/Ligne tableau mixte optionnelModèle:Infobox/Fin tableau
Titre
{{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

<td colspan="2" style="text-align:center; line-height: 1.5em;">Image illustrative de l'article Infobox/Sous-titre optionnel/Documentation
240</td> </tr> <tr> Modèle:Infobox/Légende <th colspan="2" style="padding:4px;text-align:center;background-color:#E1E1E1;color:#000000">Administration</th></tr> <tr> Modèle:Infobox/Début tableauModèle:Infobox/Ligne tableau mixte optionnelModèle:Infobox/Fin tableau
Titre
{{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}}

Voir aussi

Modèle:Projet infobox