For faster navigation, this Iframe is preloading the Wikiwand page for Module:Infobox/Infobox universelle.

Module:Infobox/Infobox universelle

 Documentation[voir] [modifier] [historique] [purger]

Utilisation[modifier le code]

Fonctions exportables :

  • fonction(frame) – description (courte description de fonction(frame) et autres informations pertinentes).
  • fonction2() – description2 (courte description de fonction2() et autres informations pertinentes).

Autres fonctions :

  • fonction() – description2 (courte description de fonction() et autres informations pertinentes).

Modules externes et autres éléments dont ce module a besoin pour fonctionner :

  • mw.title – description (courte description expliquant la dépendance de ce module externe).

Exemples[modifier le code]

Pour des exemples, voir la page de test permettant de tester diverses modifications apportées.

Voir les statistiques d'appel depuis le wikicode sur l'outil wstat et les appels depuis d'autres modules.

local p = {}
local isInstance = require( 'Module:Wikidata' ).isInstance

function p.templateName(frame)
	local item = frame.args[1]
	
	local template = "Infobox Monument" -- plus ou moins passe partout
	
	if isInstance("Q5", item, 0) then
		template = "Infobox Biographie2" 
	elseif isInstance("Q56061", item, 3) then
		template = "Infobox Localité"
	elseif isInstance("Q47461344", item, 2) then
		template = "Infobox Ouvrage"
	elseif isInstance("Q43229", item, 2) then
		template = "Infobox Organisation2"
	end
	return template
end

function p.main(frame)
	local item = frame.args[1]

	local template = "Monument" -- plus ou moins passe partout

	if isInstance("Q5", item, 0) then
		template = "Biographie" 
	elseif isInstance("Q56061", item, 3) then
		template = "Localité"
	elseif isInstance("Q47461344", item, 2) then
		template = "Ouvrage"
	elseif isInstance("Q43229", item, 2) then
		template = "Organisation"
	end
	return template
end
return p
{{bottomLinkPreText}} {{bottomLinkText}}
Module:Infobox/Infobox universelle
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.