Module:Infobox/Nœud

Une page de Wikipédia, l'encyclopédie libre.

 Documentation[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 Nœud.


local general = require "Module:Infobox/Fonctions"

local function no_wiki_hash( localdata )
	if localdata["abok"] then
		return string.gsub(localdata["abok"], "^#", "#") -- remplace le premier '#' pour ne pas etre interprété comme du wikicode
	end
end

local function add_hash(params)
	return "#" .. params.datavalue.value
end

return
	{
		maincolor = '#E1E1E1',
		parts =
		{
			general.title(),
			general.mainimage('Article à illustrer Nœud'),
			{type = 'table', rows = {
				{type = 'row', label = 'Autres noms', value = 'autres noms'},
				{type = 'row', label = '[[The Ashley Book of Knots|ABoK]]', value = no_wiki_hash, wikidata = {property = 'P1806', displayformat=add_hash} },
				{type = 'row', label = 'Catégorie', value = 'catégorie'},
				{type = 'row', label = 'Origine', value = 'origine'},
				{type = 'row', label = 'Domaine', value = 'domaine'},
				{type = 'row', label = 'Voisins', value = 'nœuds voisins'},
				}
			}
		}
	}