Bahaipedia
Bahaipedia
Menu
About Bahaipedia
Ask a question
General help
Random page
Recent changes
In other projects
Tools
What links here
Related changes
Upload file
Special pages
Printable version
Permanent link
Page information
Module
Discussion
View history
Talk
Contributions
Create account
Log in
Navigation
About Bahaipedia
Ask a question
General help
Random page
Recent changes
In other projects
Learn more
Core topics
Bahá’í Faith
Central Figures
Teachings
Practices
Tools
What links here
Related changes
Upload file
Special pages
Printable version
Permanent link
Page information
Translations

Module:Wikibase

From Bahaipedia
Jump to:navigation, search
Module documentation[view] [edit] [history] [purge]

This was a test module, you can modify it for your purposes as it is not used. See a similar Module:InfoboxWB for getting wikibase data for infoboxes.

The above documentation is transcluded from Module:Wikibase/doc. (edit | history)
Editors can experiment in this module's sandbox (create | mirror) and testcases (create) pages.
Subpages of this module.

local module = {}

function module.getSitelink(frame)
	local itemId = frame.args[1]
	local globalSiteId = frame.args[2]
	return mw.wikibase.getSitelink(itemId, globalSiteId)
end

function module.getBestStatements(frame)
	local entityId = frame.args[1]
	local propertyId = frame.args[2]
	return mw.wikibase.getBestStatements(entityId, propertyId)
end

function module.dumpBestStatements(frame)
	return mw.dumpObject(module.getBestStatements(frame))
end

function module.dumpBestStatement(frame)
	return mw.dumpObject(module.getBestStatements(frame)[1])
end

return module
Retrieved from "https://bahaipedia.org/index.php?title=Module:Wikibase&oldid=103858"
This page was last edited on 26 February 2022, at 04:46.
Text is available under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License.
Privacy policy
About Bahaipedia
Disclaimers
Powered by MediaWiki