יחידה:PropertyLink: הבדלים בין גרסאות בדף
מאין תקציר עריכה |
מאין תקציר עריכה |
||
| שורה 2: | שורה 2: | ||
function p.property(frame) | function p.property(frame) | ||
entity = mw.wikibase.getEntity() | entity = mw.wikibase.getEntity() | ||
| שורה 10: | שורה 8: | ||
return nil --the entity doesnt exist or have no claims | return nil --the entity doesnt exist or have no claims | ||
end | end | ||
property = entity.claims[frame.args[1]] | property = nil | ||
if frame.args ==nil then | |||
property = frame | |||
else | |||
property = entity.claims[frame.args[1]] | |||
end | |||
if property == nil then | if property == nil then | ||
return nil --no such property for this item | return nil --no such property for this item | ||