Module:WikidataCheck: Difference between revisions
Jump to navigation
Jump to search
>Happy5214 m (Wrong level) |
>Happy5214 m (Another typo?) |
||
Line 9: | Line 9: | ||
local entity = mw.wikibase.getEntity() | local entity = mw.wikibase.getEntity() | ||
local propValue = entity.claims[property][ | local propValue = entity.claims[property][1].mainsnak.datavalue.value | ||
return propValue | return propValue | ||
end | end |
Revision as of 05:33, 28 April 2013
Documentation for this module may be created at Module:WikidataCheck/doc
local p = {} function p.wikidatacheck(frame) local pframe = frame:getParent() local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself local args = pframe.args -- the arguments passed TO the template, in the wikitext that transcludes the template local property = config.property local entity = mw.wikibase.getEntity() local propValue = entity.claims[property][1].mainsnak.datavalue.value return propValue end