<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="he">
	<id>https://chabadpedia.co.il/index.php?action=history&amp;feed=atom&amp;title=%D7%99%D7%97%D7%99%D7%93%D7%94%3APropertyLink</id>
	<title>יחידה:PropertyLink - היסטוריית גרסאות</title>
	<link rel="self" type="application/atom+xml" href="https://chabadpedia.co.il/index.php?action=history&amp;feed=atom&amp;title=%D7%99%D7%97%D7%99%D7%93%D7%94%3APropertyLink"/>
	<link rel="alternate" type="text/html" href="https://chabadpedia.co.il/index.php?title=%D7%99%D7%97%D7%99%D7%93%D7%94:PropertyLink&amp;action=history"/>
	<updated>2026-04-10T06:46:29Z</updated>
	<subtitle>היסטוריית הגרסאות של הדף הזה בוויקי</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://chabadpedia.co.il/index.php?title=%D7%99%D7%97%D7%99%D7%93%D7%94:PropertyLink&amp;diff=774404&amp;oldid=prev</id>
		<title>מ. רובין: יצירת דף עם התוכן &quot;local FEMALE_FORM_PROPERTY = &#039;P2521&#039; local Date = require(&#039;Module:תאריך&#039;)  --  Fetch the &quot;as of date&quot; property of a associated with a property  function asOfDateQualifier(claim) 	local AS_OF_PROPERTY = &#039;P585&#039; 	local wikidataModule = require(&#039;Module:Wikidata&#039;) 	local value 	local error 	value, error = wikidataModule.getValueOfClaim(claim, AS_OF_PROPERTY, nil) 	if value then 		return &#039; (נכון ל־&#039;..value ..&#039;)&#039; 	end 	return &#039;&#039; end  local function...&quot;</title>
		<link rel="alternate" type="text/html" href="https://chabadpedia.co.il/index.php?title=%D7%99%D7%97%D7%99%D7%93%D7%94:PropertyLink&amp;diff=774404&amp;oldid=prev"/>
		<updated>2025-06-10T13:30:50Z</updated>

		<summary type="html">&lt;p&gt;יצירת דף עם התוכן &amp;quot;local FEMALE_FORM_PROPERTY = &amp;#039;P2521&amp;#039; local Date = require(&amp;#039;Module:תאריך&amp;#039;)  --&lt;a href=&quot;/index.php?title=Fetch_the_%22as_of_date%22_property_of_a_associated_with_a_property&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Fetch the &amp;quot;as of date&amp;quot; property of a associated with a property (הדף אינו קיים)&quot;&gt;Fetch the &amp;quot;as of date&amp;quot; property of a associated with a property &lt;/a&gt; function asOfDateQualifier(claim) 	local AS_OF_PROPERTY = &amp;#039;P585&amp;#039; 	local wikidataModule = require(&amp;#039;Module:Wikidata&amp;#039;) 	local value 	local error 	value, error = wikidataModule.getValueOfClaim(claim, AS_OF_PROPERTY, nil) 	if value then 		return &amp;#039; (נכון ל־&amp;#039;..value ..&amp;#039;)&amp;#039; 	end 	return &amp;#039;&amp;#039; end  local function...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;דף חדש&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local FEMALE_FORM_PROPERTY = &amp;#039;P2521&amp;#039;&lt;br /&gt;
local Date = require(&amp;#039;Module:תאריך&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
--[[ &lt;br /&gt;
Fetch the &amp;quot;as of date&amp;quot; property of a associated with a property&lt;br /&gt;
]]&lt;br /&gt;
function asOfDateQualifier(claim)&lt;br /&gt;
	local AS_OF_PROPERTY = &amp;#039;P585&amp;#039;&lt;br /&gt;
	local wikidataModule = require(&amp;#039;Module:Wikidata&amp;#039;)&lt;br /&gt;
	local value&lt;br /&gt;
	local error&lt;br /&gt;
	value, error = wikidataModule.getValueOfClaim(claim, AS_OF_PROPERTY, nil)&lt;br /&gt;
	if value then&lt;br /&gt;
		return &amp;#039; (נכון ל־&amp;#039;..value ..&amp;#039;)&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;#039;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function formatQuantity(property) &lt;br /&gt;
	local propValue = property.mainsnak and property.mainsnak.datavalue&lt;br /&gt;
	local lang = mw.getContentLanguage()&lt;br /&gt;
	local langCode = lang:getCode()&lt;br /&gt;
	local asOfDate = asOfDateQualifier(property)&lt;br /&gt;
	local localAmount = lang:formatNum( tonumber(propValue.value.amount) )&lt;br /&gt;
	local unit = &amp;#039;&amp;#039;&lt;br /&gt;
	if propValue.value.unit and string.match( propValue.value.unit, &amp;#039;http://www.wikidata.org/entity/&amp;#039; ) then&lt;br /&gt;
		local unitEntityId = string.gsub( propValue.value.unit, &amp;#039;http://www.wikidata.org/entity/&amp;#039;, &amp;#039;&amp;#039; )&lt;br /&gt;
		if unitEntityId and #unitEntityId&amp;gt;0 then&lt;br /&gt;
			-- name from label&lt;br /&gt;
			unit =  mw.wikibase.label( unitEntityId ) or &amp;#039;&amp;#039;&lt;br /&gt;
			local unitSymbol = mw.wikibase.getBestStatements(unitEntityId, &amp;#039;P5061&amp;#039;)&lt;br /&gt;
			--  name from properties&lt;br /&gt;
			if unitSymbol then&lt;br /&gt;
				local writingSystemElementId = &amp;#039;Q33513&amp;#039; -- hebrew writing system&lt;br /&gt;
				local langElementId = &amp;#039;Q9288&amp;#039; -- hebrew&lt;br /&gt;
				local labelFilter = &amp;#039;P5061[language:&amp;#039;..langCode..&amp;#039;], P5061[P282:&amp;#039; .. writingSystemElementId .. &amp;#039;, P407:&amp;#039; .. langElementId .. &amp;#039;]&amp;#039;&lt;br /&gt;
				local WDS = require( &amp;#039;Module:WikidataSelectors&amp;#039; )&lt;br /&gt;
				local labelClaims = WDS.filter( {[&amp;#039;P5061&amp;#039;]=unitSymbol }, labelFilter )&lt;br /&gt;
				for r, claim in pairs( labelClaims ) do&lt;br /&gt;
					if claim.mainsnak and claim.mainsnak.datavalue.type == &amp;#039;monolingualtext&amp;#039; and claim.mainsnak.datavalue.value.text then&lt;br /&gt;
						unit = claim.mainsnak.datavalue.value.text&lt;br /&gt;
						break;&lt;br /&gt;
					elseif claim.mainsnak and claim.mainsnak.datavalue and claim.mainsnak.datavalue.type == &amp;#039;string&amp;#039; and claim.mainsnak.datavalue.value ~= &amp;#039;&amp;#039; then&lt;br /&gt;
						unit = claim.mainsnak.datavalue.value&lt;br /&gt;
						break;&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
			end&lt;br /&gt;
		&lt;br /&gt;
			unit = &amp;#039; &amp;#039; .. unit&lt;br /&gt;
		end&lt;br /&gt;
    end	&lt;br /&gt;
	return localAmount .. unit .. asOfDate&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function getPropertyQualifier(property, qualifier)&lt;br /&gt;
	local wikidataModule = require(&amp;#039;Module:Wikidata&amp;#039;)&lt;br /&gt;
	local entity = mw.wikibase.getEntityIdForCurrentPage()&lt;br /&gt;
    if not entity then return end --the entity doesnt exist or have no claims&lt;br /&gt;
	&lt;br /&gt;
    local propertyVals = mw.wikibase.getAllStatements( entity, property )&lt;br /&gt;
    if not propertyVals or not propertyVals[1] then return end --no such property for this item&lt;br /&gt;
 	value, error = wikidataModule.getValueOfClaim(propertyVals[1], qualifier, nil)&lt;br /&gt;
	return value&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function missingLabelCategory(propertyName)&lt;br /&gt;
	return &amp;#039;[[קטגוריה:ויקינתונים:ערכים_חסרי_תווית_בעברית: &amp;#039; .. (mw.wikibase.label( propertyName) or propertyName) .. &amp;#039;]][[קטגוריה:ויקינתונים:ערכים_חסרי_תווית_בעברית]]&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getFemaleLabelForEntityId( entityId )&lt;br /&gt;
	local WDS = require(&amp;#039;Module:WikidataSelectors&amp;#039;)&lt;br /&gt;
	local femaleForm = mw.wikibase.getBestStatements(entityId, FEMALE_FORM_PROPERTY)&lt;br /&gt;
	&lt;br /&gt;
	if not femaleForm then return nil, false end&lt;br /&gt;
	&lt;br /&gt;
	local femLabels = WDS.filterByLanguage( femaleForm, &amp;#039;he&amp;#039; )&lt;br /&gt;
	if femLabels ~= nil and&lt;br /&gt;
	   femLabels[1] and&lt;br /&gt;
	   femLabels[1].mainsnak and&lt;br /&gt;
	   femLabels[1].mainsnak.datavalue and&lt;br /&gt;
	   femLabels[1].mainsnak.datavalue.value and&lt;br /&gt;
	   femLabels[1].mainsnak.datavalue.value.text then&lt;br /&gt;
		return femLabels[1].mainsnak.datavalue.value.text&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	return nil, #femaleForm &amp;gt; 0&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Get a link to specific entity. E.g sitelink|label.&lt;br /&gt;
* Missing label =&amp;gt; use sitelink as fallback&lt;br /&gt;
* Missing sitelink =&amp;gt; just show label&lt;br /&gt;
* Mssing gender form: adds category of missing gender label&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
@param {string} entityId - id of entity to link to (e.g Q42)&lt;br /&gt;
@param {string} genderAwareEntity - entity from which to fetch gender for gender form&lt;br /&gt;
@returns {string, bool} formattedValue, missingTranslation - the formatted value along with indicator of missing translation&lt;br /&gt;
]]&lt;br /&gt;
function formatEntity(entityId, genderAwareEntity)&lt;br /&gt;
	local linkTarget = mw.wikibase.sitelink( entityId )&lt;br /&gt;
    local localLabel, langLabel, missingFemaleForm&lt;br /&gt;
    local formattedValue&lt;br /&gt;
    local missingTranslation = false&lt;br /&gt;
    local fallbackLanguage = false&lt;br /&gt;
    if genderAwareEntity then&lt;br /&gt;
    	local gender = mw.wikibase.getBestStatements(genderAwareEntity, &amp;#039;P21&amp;#039;) -- P21 - gender&lt;br /&gt;
    	local isFemale = gender and&lt;br /&gt;
    	                 gender[1] and&lt;br /&gt;
    	                 gender[1].mainsnak and&lt;br /&gt;
    	                 gender[1].mainsnak.datavalue and&lt;br /&gt;
    	                 gender[1].mainsnak.datavalue.value and&lt;br /&gt;
    	                 (gender[1].mainsnak.datavalue.value[&amp;quot;numeric-id&amp;quot;] == 6581072 or gender[1].mainsnak.datavalue.value[&amp;quot;numeric-id&amp;quot;] == 1052281)&lt;br /&gt;
&lt;br /&gt;
    	if isFemale then&lt;br /&gt;
    		localLabel, missingFemaleForm = getFemaleLabelForEntityId( entityId )&lt;br /&gt;
    		langLabel = &amp;#039;he&amp;#039;&lt;br /&gt;
    	end&lt;br /&gt;
    	-- if we dont have/need female form label,  use regular label&lt;br /&gt;
    	if localLabel == nil then&lt;br /&gt;
    		localLabel, langLabel = mw.wikibase.getLabelWithLang( entityId )&lt;br /&gt;
    	end&lt;br /&gt;
    else&lt;br /&gt;
    	-- use Hebrew label&lt;br /&gt;
    	localLabel, langLabel = mw.wikibase.getLabelWithLang( entityId )&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    local isLocalLabel = langLabel==&amp;#039;he&amp;#039;&lt;br /&gt;
    -- fallback if there is target but no label, use target as label&lt;br /&gt;
    if linkTarget and not isLocalLabel then&lt;br /&gt;
    	localLabel = linkTarget&lt;br /&gt;
    	isLocalLabel = true&lt;br /&gt;
    end&lt;br /&gt;
    if localLabel and isLocalLabel then&lt;br /&gt;
			if linkTarget and localLabel and linkTarget == localLabel then&lt;br /&gt;
				formattedValue = mw.ustring.format( &amp;quot;[[%s]]&amp;quot;, linkTarget )&lt;br /&gt;
			else&lt;br /&gt;
    			formattedValue = linkTarget and localLabel and mw.ustring.format( &amp;quot;[[%s|%s]]&amp;quot;, linkTarget, localLabel ) or localLabel&lt;br /&gt;
    		end&lt;br /&gt;
    		if missingFemaleForm then&lt;br /&gt;
    			mw.log(mw.ustring.format(&amp;#039;חסרה צורת הנקבה ל&amp;quot;%s&amp;quot; (%s)&amp;#039;, formattedValue, entityId))&lt;br /&gt;
    			formattedValue = formattedValue .. missingLabelCategory( FEMALE_FORM_PROPERTY )&lt;br /&gt;
    		end&lt;br /&gt;
    else&lt;br /&gt;
		missingTranslation = true&lt;br /&gt;
		-- in that case we would unfourtanly can show only the entity id which is meaningless for users&lt;br /&gt;
		 if langLabel==&amp;#039;en&amp;#039; then&lt;br /&gt;
		 	fallbackLanguage = true&lt;br /&gt;
    		formattedValue = mw.ustring.format(&amp;#039;&amp;lt;span lang=&amp;quot;en&amp;quot; dir=&amp;quot;ltr&amp;quot;&amp;gt;%s&amp;lt;/span&amp;gt;&amp;#039;, localLabel)&lt;br /&gt;
    	else&lt;br /&gt;
			formattedValue = mw.ustring.format( &amp;quot;[[:d:%s|%s]]&amp;quot;, entityId, entityId )&lt;br /&gt;
		end&lt;br /&gt;
    end&lt;br /&gt;
    return formattedValue, missingTranslation, fallbackLanguage&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function formatOptionalQualifiers(property, qualifiers, qualifiersSep)&lt;br /&gt;
	if (qualifiers==nil) or (#qualifiers == 0) or (not property.qualifiers) then return &amp;#039;&amp;#039; end&lt;br /&gt;
	qualifiersSep = qualifiersSep or &amp;#039;, &amp;#039;&lt;br /&gt;
	&lt;br /&gt;
	local formmatedQualifiers = {}&lt;br /&gt;
	local warnings = &amp;#039;&amp;#039;&lt;br /&gt;
	for _, optionalQualifier in pairs( qualifiers ) do&lt;br /&gt;
		-- handling case of &amp;quot;first or default&amp;quot; qualifier (e.g.: for &amp;#039;P1/P2&amp;#039; take P1 if exists, otherwise - P2)&lt;br /&gt;
		for selectableQualifier in string.gmatch(optionalQualifier, &amp;#039;[^/]+&amp;#039;) do&lt;br /&gt;
			if selectableQualifier and property.qualifiers[selectableQualifier] then&lt;br /&gt;
				local optionalQualifierVal = mw.wikibase.formatValues(property.qualifiers[selectableQualifier])&lt;br /&gt;
				local isQualLocalLabel = true&lt;br /&gt;
				if optionalQualifierVal and property.qualifiers[selectableQualifier][1] and property.qualifiers[selectableQualifier][1][&amp;#039;datatype&amp;#039;]==&amp;#039;wikibase-item&amp;#039; then &lt;br /&gt;
					for i, optionalQValues in ipairs(property.qualifiers[selectableQualifier]) do&lt;br /&gt;
						local qualLabel, qualLang = mw.wikibase.getLabelWithLang( optionalQValues[&amp;#039;datavalue&amp;#039;][&amp;#039;value&amp;#039;][&amp;#039;id&amp;#039;] )&lt;br /&gt;
						isQualLocalLabel = isQualLocalLabel and (qualLang==&amp;#039;he&amp;#039;)&lt;br /&gt;
					end&lt;br /&gt;
				end&lt;br /&gt;
				if optionalQualifierVal then&lt;br /&gt;
					local formattedValue = &amp;#039;&amp;lt;span title=&amp;quot;&amp;#039;.. mw.wikibase.label(selectableQualifier)..&amp;#039;&amp;quot; class=&amp;quot;propertylink-wikidata-qualifier&amp;quot;&amp;gt;&amp;#039;..mw.wikibase.formatValues(property.qualifiers[selectableQualifier]) ..&amp;#039;&amp;lt;/span&amp;gt;&amp;#039;&lt;br /&gt;
					table.insert(formmatedQualifiers, formattedValue)&lt;br /&gt;
					break -- found first available value&lt;br /&gt;
				end&lt;br /&gt;
			elseif string.sub(selectableQualifier, 1, 1) ~= &amp;#039;P&amp;#039; then&lt;br /&gt;
				table.insert(formmatedQualifiers, selectableQualifier)&lt;br /&gt;
				break -- found first available value&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	local res =  table.concat( formmatedQualifiers, qualifiersSep)&lt;br /&gt;
	if #formmatedQualifiers &amp;gt; 0 then&lt;br /&gt;
		res = mw.ustring.format(&amp;#039;&amp;lt;span style=&amp;quot;font-size:0.9em;&amp;quot;&amp;gt; (%s)&amp;lt;/span&amp;gt;&amp;#039;, res)&lt;br /&gt;
	end		&lt;br /&gt;
	return res .. warnings&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[ &lt;br /&gt;
Fetch property from wikidata and format it:&lt;br /&gt;
* if the entity or the claim doesn&amp;#039;t exist - nil&lt;br /&gt;
* Formating rules:&lt;br /&gt;
	- for entity reference - returns link to entity (using sitelink) with label as text, otherwise wikidata label as text&lt;br /&gt;
	- for string - returns the string&lt;br /&gt;
	- for quantity - returns the amount&lt;br /&gt;
	- for time - returns the time as string&lt;br /&gt;
	- for image - returns image inclusion with 250px size&lt;br /&gt;
* Multivalues:&lt;br /&gt;
	Multivalue is supported with allowMulti. seperator between values defined by multiSeperator&lt;br /&gt;
	&lt;br /&gt;
@param {string} propertyName - name of property (e.g P123)&lt;br /&gt;
@param {bool} allowMulti - whether only first statement should be fetched are all statements.&lt;br /&gt;
@param {bool} allowNA - whether if is valid to fetch somevalue snaks: Default: nil/false&lt;br /&gt;
@param {string} entityId - Qid of the entity for which we fetch the data. Default: nil (page entity)&lt;br /&gt;
@param {string} multiSeperator - seperator between multiple values. Default: ,&lt;br /&gt;
@param {string} optionalQualifier - Property id of optional extra qualifier (e.g P123). will be formatted as propertyName (optionalQualifier)&lt;br /&gt;
@param {bool} genderAware - Fetch gender form instead of regular label&lt;br /&gt;
]]&lt;br /&gt;
function getProperty( propertyName, allowMulti, allowNA, entityId, multiSeperator, optionalQualifier, genderAware )&lt;br /&gt;
	if propertyName==nil or #propertyName==0 then return end -- no property specified&lt;br /&gt;
	entityId = entityId&lt;br /&gt;
	if entityId == nil then return end -- entity doesnt exist&lt;br /&gt;
	options = {&lt;br /&gt;
		[&amp;#039;allowMulti&amp;#039;] = allowMulti,&lt;br /&gt;
		[&amp;#039;allowNA&amp;#039;] = allowNA,&lt;br /&gt;
		[&amp;#039;seperator&amp;#039;] = multiSeperator or &amp;#039;, &amp;#039;,&lt;br /&gt;
		[&amp;#039;qualifier&amp;#039;] = optionalQualifier,&lt;br /&gt;
		[&amp;#039;entity-gender-aware&amp;#039;] = genderAware&lt;br /&gt;
	}&lt;br /&gt;
	if optionalQualifier then&lt;br /&gt;
		options[&amp;#039;qualifiers&amp;#039;] = {optionalQualifier}&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return getPropertyByOptions(propertyName, entityId, options)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function property( frame )&lt;br /&gt;
    return &amp;#039;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function propertyWithGender(frame)&lt;br /&gt;
	return getProperty(string.upper(frame.args[1]), (frame.args[2] and string.len(frame.args[2])&amp;gt;0) or false, true, frame.args[&amp;#039;entity&amp;#039;], &amp;#039;, &amp;#039;, &amp;#039;&amp;#039;, true)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- formatted reference for statement. Only for non imported statements&lt;br /&gt;
function refStatement(statement)&lt;br /&gt;
	if not statement.references or #statement.references == 0 then return &amp;#039;&amp;#039; end -- no reference&lt;br /&gt;
	local formattedReferences = {}&lt;br /&gt;
	local frame = mw.getCurrentFrame()&lt;br /&gt;
	for j, curRef in ipairs(statement.references) do&lt;br /&gt;
		local isImportedRef = curRef.snaks and (curRef.snaks[&amp;#039;P143&amp;#039;] or curRef.snaks[&amp;#039;P4656&amp;#039;])&lt;br /&gt;
		if not isImportedRef then&lt;br /&gt;
			if curRef.snaks[&amp;#039;P854&amp;#039;] then&lt;br /&gt;
				table.insert(formattedReferences, frame:extensionTag{  name = &amp;#039;ref&amp;#039;, content = mw.wikibase.renderSnak(curRef.snaks[&amp;#039;P854&amp;#039;][1])})&lt;br /&gt;
			elseif curRef.snaks[&amp;#039;P2699&amp;#039;] then&lt;br /&gt;
				table.insert(formattedReferences, frame:extensionTag{  name = &amp;#039;ref&amp;#039;, content = mw.wikibase.renderSnak(curRef.snaks[&amp;#039;P2699&amp;#039;][1])})&lt;br /&gt;
			else&lt;br /&gt;
				table.insert(formattedReferences, frame:extensionTag{  name = &amp;#039;ref&amp;#039;, content = mw.wikibase.formatValues(curRef.snaks)})&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return table.concat(formattedReferences, &amp;#039;&amp;#039;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[ &lt;br /&gt;
Fetch property from specified entity.&lt;br /&gt;
&lt;br /&gt;
@param {string} propertyName - name of property (e.g P123)&lt;br /&gt;
@param {string} entityId - Qid of the entity for which we fetch the data. Default: nil (page entity)&lt;br /&gt;
@param {table} options - table with following supported parameters:&lt;br /&gt;
	- seperator - seperator between multiple values. Default: ,&lt;br /&gt;
	- allowMulti - whether only first statement should be fetched are all statements.&lt;br /&gt;
	- allowNA - whether if is valid to fetch somevalue snaks: Default: nil/false&lt;br /&gt;
	- entity-gender-aware - Fetch gender form instead of regular label &lt;br /&gt;
	- qualifiers - list of optional qualifers to append to property value (Example {&amp;#039;P1&amp;#039;, &amp;#039;P2&amp;#039;))&lt;br /&gt;
	- qualifiers-sep - seperator between optional qualifiers&lt;br /&gt;
	- img-width - width of image&lt;br /&gt;
]]&lt;br /&gt;
function getPropertyByOptions( propertyName, entityId, options )&lt;br /&gt;
	-- verify entity exists&lt;br /&gt;
	if entityId==nil then return end&lt;br /&gt;
	&lt;br /&gt;
	-- defaults&lt;br /&gt;
	options = options or {}&lt;br /&gt;
	options[&amp;#039;seperator&amp;#039;] = options[&amp;#039;seperator&amp;#039;] or &amp;#039;, &amp;#039;&lt;br /&gt;
	options[&amp;#039;allowMulti&amp;#039;] = options[&amp;#039;allowMulti&amp;#039;] or false&lt;br /&gt;
	options[&amp;#039;allowNA&amp;#039;] = options[&amp;#039;allowNA&amp;#039;] or false&lt;br /&gt;
	options[&amp;#039;entity-gender-aware&amp;#039;] = options[&amp;#039;entity-gender-aware&amp;#039;] or false -- Fetch gender form instead of regular label&lt;br /&gt;
	options[&amp;#039;qualifiers&amp;#039;] = options[&amp;#039;qualifiers&amp;#039;] or {} -- fetch optional qualifiers&lt;br /&gt;
	options[&amp;#039;qualifiers-sep&amp;#039;] = options[&amp;#039;qualifiers-sep&amp;#039;] or &amp;#039;, &amp;#039;&lt;br /&gt;
	options[&amp;#039;img-width&amp;#039;] = options[&amp;#039;img-width&amp;#039;] or &amp;#039;250px&amp;#039;&lt;br /&gt;
	options[&amp;#039;source&amp;#039;] = options[&amp;#039;source&amp;#039;] or false&lt;br /&gt;
	options[&amp;#039;filter&amp;#039;] = options[&amp;#039;filter&amp;#039;] or nil&lt;br /&gt;
	&lt;br /&gt;
    return --no such property for this item&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function getLabel( propertyName, entityId )&lt;br /&gt;
    local entity = entityId&lt;br /&gt;
    if not entity then return end--the entity doesnt exist or have no claims&lt;br /&gt;
    local property =  mw.wikibase.getBestStatements(entity, propertyName)&lt;br /&gt;
    if not property or not property[1] then return end --no such property for this item&lt;br /&gt;
    &lt;br /&gt;
    property = property[1]&lt;br /&gt;
    local propValue = property.mainsnak.datavalue&lt;br /&gt;
    if not propValue then return &amp;#039;&amp;#039; end --property doesnt exist&lt;br /&gt;
&lt;br /&gt;
    if propValue[&amp;#039;type&amp;#039;] == &amp;#039;wikibase-entityid&amp;#039; then&lt;br /&gt;
        local label, lang = mw.wikibase.label( propValue.value[&amp;#039;id&amp;#039;] )&lt;br /&gt;
        return label&lt;br /&gt;
    elseif propValue[&amp;#039;type&amp;#039;] == &amp;#039;string&amp;#039; then&lt;br /&gt;
        return propValue.value&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Return the label for property, or the label of the linked entiy of that property&lt;br /&gt;
function label( frame )&lt;br /&gt;
    return getLabel( string.upper(frame.args[1] ))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function getItem( propertyName, entityId )&lt;br /&gt;
    local entity = entityId&lt;br /&gt;
    if not entity then return end--the entity doesnt exist or have no claims&lt;br /&gt;
    local property =  mw.wikibase.getBestStatements(entity, propertyName)&lt;br /&gt;
    if not property or not property[1] then return end --no such property for this item&lt;br /&gt;
    &lt;br /&gt;
    property = property[1]&lt;br /&gt;
    local propValue = property.mainsnak.datavalue&lt;br /&gt;
    if not propValue then return &amp;#039;&amp;#039; end --property doesnt exist&lt;br /&gt;
&lt;br /&gt;
    return propValue.value[&amp;#039;id&amp;#039;]&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Return the Item for property, or the item of the linked entiy of that property&lt;br /&gt;
function item( frame )&lt;br /&gt;
    return getItem( string.upper(frame.args[1] ))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function getImageLink( propName, width, align, description, border, entityId)&lt;br /&gt;
    return --the entity doesnt exist or have no claims&lt;br /&gt;
end&lt;br /&gt;
    &lt;br /&gt;
--use this function to get associated image to be used in the article&lt;br /&gt;
function imageLink( frame )&lt;br /&gt;
    return getImageLink(string.upper(frame.args[1] or &amp;#039;P18&amp;#039;), frame.args[&amp;quot;width&amp;quot;], frame.args[&amp;quot;align&amp;quot;], frame.args[&amp;quot;description&amp;quot;], frame.args[&amp;quot;גבול&amp;quot;])&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- returns &amp;quot;1&amp;quot; if the page has an associated wikidata entry, &amp;quot;&amp;quot; otherwise&lt;br /&gt;
function hasEntry()&lt;br /&gt;
    local entity = mw.wikibase.getEntityIdForCurrentPage()&lt;br /&gt;
    --if not entity or not entity.claims then return end --the entity doesnt exist or have no claims&lt;br /&gt;
    if not entity then return end --the entity doesnt exist or have no claims&lt;br /&gt;
    return 1&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- returns the wikidata Qid, if exists, &amp;quot;&amp;quot; otherwise&lt;br /&gt;
function getPageEntry(frame)&lt;br /&gt;
	return mw.wikibase.getEntityIdForTitle(string.upper(frame.args[1] ))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function getSitelinksFromQid(frame)&lt;br /&gt;
	resTable =mw.wikibase.getEntity(string.upper(frame.args[1] ))&lt;br /&gt;
	resTable = resTable[&amp;quot;sitelinks&amp;quot;]&lt;br /&gt;
	s= &amp;quot;&amp;lt;table&amp;gt;\n&amp;quot;&lt;br /&gt;
		for k,v in pairs(resTable) do&lt;br /&gt;
			if  v.title then&lt;br /&gt;
				s=s..&amp;quot;&amp;lt;tr&amp;gt;&amp;quot;.. &amp;quot;&amp;lt;td&amp;gt;&amp;quot; .. k..&amp;quot;&amp;lt;/td&amp;gt;&amp;quot;.. &amp;quot;&amp;lt;td&amp;gt;&amp;quot; .. v.title..&amp;quot;&amp;lt;/td&amp;gt;&amp;quot;..&amp;quot;&amp;lt;/tr&amp;gt;&amp;quot; .. &amp;quot;\n&amp;quot;&lt;br /&gt;
		end &lt;br /&gt;
end&lt;br /&gt;
	&lt;br /&gt;
		return s .. &amp;quot;&amp;lt;/table&amp;gt;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
end &lt;br /&gt;
return {&lt;br /&gt;
    imageLink = imageLink,&lt;br /&gt;
    [&amp;#039;תמונה&amp;#039;] = imageLink,&lt;br /&gt;
    label = label,&lt;br /&gt;
    [&amp;#039;תווית&amp;#039;] = label,&lt;br /&gt;
    item = item,&lt;br /&gt;
    [&amp;#039;פריט&amp;#039;] = item,&lt;br /&gt;
    formatEntity = formatEntity,&lt;br /&gt;
    property = property,&lt;br /&gt;
    propertyWithGender = propertyWithGender,&lt;br /&gt;
    [&amp;#039;מאפיין&amp;#039;] = property,&lt;br /&gt;
    getProperty = getProperty,&lt;br /&gt;
    getPropertyByOptions = getPropertyByOptions,&lt;br /&gt;
    getPropertyQualifier = getPropertyQualifier,&lt;br /&gt;
    getImageLink = getImageLink,&lt;br /&gt;
    getLabel = getLabel,&lt;br /&gt;
    hasEntry = hasEntry,&lt;br /&gt;
    getPageEntry = getPageEntry,&lt;br /&gt;
    getSitelinksFromQid=getSitelinksFromQid,&lt;br /&gt;
    [&amp;#039;יש פריט&amp;#039;] = hasEntry&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>מ. רובין</name></author>
	</entry>
</feed>