יחידה:תבנית מידע: הבדלים בין גרסאות בדף
מ אפשרות סינון |
מאין תקציר עריכה |
||
| שורה 391: | שורה 391: | ||
if templateParams[missingParam..'-ויקינתונים-סינון'] == 'קיים' then | if templateParams[missingParam..'-ויקינתונים-סינון'] == 'קיים' then | ||
wikidataOptions['filter'] = filterExists | wikidataOptions['filter'] = filterExists | ||
elseif templateParams[missingParam..'-ויקינתונים-סינון'] and mw.ustring.match(templateParams[missingParam..'-ויקינתונים-סינון'], 'filter[a-zA-Z]+') then | |||
local moduleTitle = mw.ustring.match( frame:getParent():getTitle(), 'תבנית:(.+)' ) | |||
moduleTitle = mw.ustring.format('יחידה:%s', moduleTitle) | |||
local filterFunc = mw.ustring.match(templateParams[missingParam..'-ויקינתונים-סינון'],'filter[a-zA-Z]+') | |||
wikidataOptions['filter'] = require(moduleTitle)[filterFunc] | |||
end | end | ||