יחידה:תבנית מידע: הבדלים בין גרסאות בדף
מאין תקציר עריכה |
מאין תקציר עריכה |
||
| שורה 430: | שורה 430: | ||
end | end | ||
end | end | ||
end | |||
-- use wikidata in title | -- use wikidata in title | ||
local m = mw.ustring.match(args.title, '\{\{\{(.-)\|?\}\}\}') | if args.title then | ||
local m = mw.ustring.match(args.title, '\{\{\{(.-)\|?\}\}\}') | |||
if m then | |||
local inWikidata = false | |||
if templateParams[m..'-ויקינתונים'] then | |||
local wikidataParamValue = propertyLink.getProperty(templateParams[m..'-ויקינתונים']) or nil | |||
if wikidataParamValue then | |||
args.title = wikidataParamValue | |||
end | |||
elseif templateParams[m..'-ויקינתונים-פשוט'] then | |||
-- use data should be taken from wikidata and link must not be added | |||
local wikidataParamValue = propertyLink.getLabel(templateParams[m..'-ויקינתונים-פשוט']) | |||
if wikidataParamValue then | |||
args.title = frame:preprocess(mw.ustring.gsub(args.title, '\{\{\{('..m..')\|?\}\}\}', wikidataParamValue)) | |||
end | |||
end | end | ||
end | end | ||