<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="nb">
	<id>https://www.wikisida.no/index.php?action=history&amp;feed=atom&amp;title=Modul%3APropertyLink</id>
	<title>Modul:PropertyLink - Sideversjonshistorikk</title>
	<link rel="self" type="application/atom+xml" href="https://www.wikisida.no/index.php?action=history&amp;feed=atom&amp;title=Modul%3APropertyLink"/>
	<link rel="alternate" type="text/html" href="https://www.wikisida.no/index.php?title=Modul:PropertyLink&amp;action=history"/>
	<updated>2026-05-03T12:41:36Z</updated>
	<subtitle>Versjonshistorikk for denne siden på wikien</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://www.wikisida.no/index.php?title=Modul:PropertyLink&amp;diff=34484&amp;oldid=prev</id>
		<title>Wikisida: Én sideversjon ble importert</title>
		<link rel="alternate" type="text/html" href="https://www.wikisida.no/index.php?title=Modul:PropertyLink&amp;diff=34484&amp;oldid=prev"/>
		<updated>2026-02-17T19:18:57Z</updated>

		<summary type="html">&lt;p&gt;Én sideversjon ble importert&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;nb&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Eldre sideversjon&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Sideversjonen fra 17. feb. 2026 kl. 19:18&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;nb&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(Ingen forskjell)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Wikisida</name></author>
	</entry>
	<entry>
		<id>https://www.wikisida.no/index.php?title=Modul:PropertyLink&amp;diff=34483&amp;oldid=prev</id>
		<title>nb&gt;Lucie Kaffee (WMDE): change mw.wikibase.getEntitiy (deprecated) to mw.wikibase.getEntityObject</title>
		<link rel="alternate" type="text/html" href="https://www.wikisida.no/index.php?title=Modul:PropertyLink&amp;diff=34483&amp;oldid=prev"/>
		<updated>2015-03-02T14:42:05Z</updated>

		<summary type="html">&lt;p&gt;change mw.wikibase.getEntitiy (deprecated) to mw.wikibase.getEntityObject&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Ny side&lt;/b&gt;&lt;/p&gt;&lt;div&gt;function getProperty( propertyName )&lt;br /&gt;
    local entity = mw.wikibase.getEntityObject()&lt;br /&gt;
    if not entity or not entity.claims then return end--the entity doesnt exist or have no claims&lt;br /&gt;
    local property = entity.claims[propertyName]&lt;br /&gt;
    if not property then return end--no such property for this item&lt;br /&gt;
    property = property[1]&lt;br /&gt;
    local propValue = property.mainsnak and property.mainsnak.datavalue&lt;br /&gt;
    if not propValue then return end --property doesnt exist&lt;br /&gt;
    if propValue[&amp;#039;type&amp;#039;] == &amp;#039;wikibase-entityid&amp;#039; then&lt;br /&gt;
        local linkTarget = mw.wikibase.sitelink( &amp;quot;Q&amp;quot; .. propValue.value[&amp;#039;numeric-id&amp;#039;] )&lt;br /&gt;
        local linkTitle = mw.wikibase.label( &amp;quot;Q&amp;quot; ..propValue.value[&amp;#039;numeric-id&amp;#039;] )&lt;br /&gt;
        return linkTarget and linkTitle and mw.ustring.format( &amp;quot;[[%s|%s]]&amp;quot;, linkTarget, linkTitle )&lt;br /&gt;
            or linkTitle&lt;br /&gt;
    elseif propValue and propValue[&amp;#039;type&amp;#039;] == &amp;#039;string&amp;#039; then return propValue.value end&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
function property( frame )&lt;br /&gt;
    return getProperty(string.lower(frame.args[1]))&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
function getLabel( propertyName )&lt;br /&gt;
    local entity = mw.wikibase.getEntityObject()&lt;br /&gt;
    if not entity or not entity.claims then return end--the entity doesnt exist or have no claims&lt;br /&gt;
    local property = entity.claims[propertyName]&lt;br /&gt;
    if not property 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;
        return mw.wikibase.label( &amp;quot;Q&amp;quot; ..propValue.value[&amp;#039;numeric-id&amp;#039;] )&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.lower(frame.args[1] ))&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
function getImageLink( propName, width)&lt;br /&gt;
    local entity = mw.wikibase.getEntityObject()&lt;br /&gt;
    if not entity or not entity.claims then return end --the entity doesnt exist or have no claims&lt;br /&gt;
    local property = entity.claims[propName or &amp;quot;P18&amp;quot;]&lt;br /&gt;
    if property then&lt;br /&gt;
        local width = width or &amp;quot;220&amp;quot;&lt;br /&gt;
        return mw.ustring.format( &amp;#039;[[File:%s|%spx]]&amp;#039;, property[1].mainsnak.datavalue.value, width )&lt;br /&gt;
    end&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.lower(frame.args[1]), frame.args[&amp;quot;width&amp;quot;])&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
return {&lt;br /&gt;
    imageLink = imageLink,&lt;br /&gt;
    Image = imageLink,&lt;br /&gt;
    File = imageLink,&lt;br /&gt;
    label = label,&lt;br /&gt;
    Label = label,&lt;br /&gt;
    property = property,&lt;br /&gt;
    Property = property,&lt;br /&gt;
    getProperty = getProperty,&lt;br /&gt;
    getImageLink = getImageLink,&lt;br /&gt;
    getLabel = getLabel&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>nb&gt;Lucie Kaffee (WMDE)</name></author>
	</entry>
</feed>