יחידה:PropertyLink: הבדלים בין גרסאות בדף

מאין תקציר עריכה
מחפיק
שורה 172: שורה 172:


function property( frame )
function property( frame )
    return getProperty(string.upper(frame.args[1]), (frame.args[2] and string.len(frame.args[2])>0) or false, true, frame.args['entity'], ', ')
local ok, result = pcall(function() getProperty(string.upper(frame.args[1]), (frame.args[2] and string.len(frame.args[2])>0) or false, true, frame.args['entity'], ', ') end)
    return ok and result or ''
end
end


שורה 195: שורה 196:
-- Return the label for property, or the label of the linked entiy of that property
-- Return the label for property, or the label of the linked entiy of that property
function label( frame )
function label( frame )
    return getLabel( string.upper(frame.args[1] ))
local ok, result = pcall(function() getLabel( string.upper(frame.args[1] )) end )
    return ok and result or ''
end
end


שורה 217: שורה 219:
--use this function to get associated image to be used in the article
--use this function to get associated image to be used in the article
function imageLink( frame )
function imageLink( frame )
    return getImageLink(string.upper(frame.args[1] or 'P18'), frame.args["width"], frame.args["align"], frame.args["description"], frame.args["גבול"])
local ok, result = pcall(function()getImageLink(string.upper(frame.args[1] or 'P18'), frame.args["width"], frame.args["align"], frame.args["description"], frame.args["גבול"])end)
    return ok and result or ''
end
end