Module:Infobox/Cocktail
Apparence
[voir] [modifier] [historique] [purger]
Cette page définit un module d'infobox. Pour les conseils sur l'usage de ce module, voyez Modèle:Infobox Cocktail.
La documentation de ce module est générée par le modèle {{Documentation module}}.
Elle est incluse depuis la page Modèle:Documentation module d'infobox. Veuillez placer les catégories sur cette page-là.
Les éditeurs peuvent travailler dans le bac à sable (créer).
Voir les statistiques d'appel depuis le wikicode sur l'outil wstat et les appels depuis d'autres modules.
local general = require 'Module:Infobox/Fonctions'
local localdata = require 'Module:Infobox/Localdata'
return {
maincolor = '#E7DCC3',
parts = {
{
type = 'title',
value = 'nom',
property = 'P1448', -- Élément « Nom officiel »
},
general.mainimage("Article à illustrer Cocktail"),
{
type = 'text',
value = function() return '<hr style=\'background-color: #E7DCC3;\'>' end,
},
{
type = 'table',
rows = {
{
type = 'mixed',
value = 'origine',
label = 'Pays d\'origine',
wikidata = {
property = { 'P485', 'P17' }, -- Élément « Pays d'origine » ou « Pays »
rank = valid,
link = '-',
defaultlink = '-',
statementformat = function(statement)
local v = mw.wikibase.formatValue(statement.mainsnak)
return mw.getCurrentFrame():expandTemplate{
title = 'Pays',
args = { v }
}
end,
}
},
{
type = 'mixed',
label = 'Alcool prinicipal',
value = 'alcool principal',
},
{
type = 'mixed',
label = 'Servi',
value = 'servi',
},
{
type = 'mixed',
label = 'Décoration / garnitude',
value = 'décoration',
},
{
type = 'mixed',
label = 'Type de verre',
value = 'type de verre',
},
{
type = 'mixed',
value = 'ingrédients',
label = 'Ingrédients',
property = 'P186', -- Éléments « Matériau »
},
{
type = 'mixed',
value = 'préparation',
label = 'Préparation',
},
}
},
},
}