Модуль:Предмет: различия между версиями
Pok (обсуждение | вклад) Нет описания правки |
Pok (обсуждение | вклад) Нет описания правки |
||
| Строка 30: | Строка 30: | ||
local isWrap = argsRaw.wrapper ~= nil | local isWrap = argsRaw.wrapper ~= nil | ||
local isVert = argsRaw.vertical ~= nil | local isVert = argsRaw.vertical ~= nil | ||
local hasId = (JsonPaths.has(id) == true) | local hasId = (JsonPaths.has(id) == true) | ||
local projPrefix = hasId and JsonPaths.prefix() or '' | local projPrefix = hasId and JsonPaths.prefix() or '' | ||
-- Получение имени | -- Получение имени | ||
| Строка 54: | Строка 52: | ||
-- Изображение | -- Изображение | ||
local imgFile = argsRaw.image or argsRaw.img or (id .. '.png') | local imgFile = argsRaw.image or argsRaw.img or (JsonPaths.prefixFile(id) .. '.png') | ||
local img = imgFile ~= '' and formatImage(imgFile, size, linkTgt) or '' | local img = imgFile ~= '' and formatImage(imgFile, size, linkTgt) or '' | ||
if argsRaw.imageTooltip then | if argsRaw.imageTooltip then | ||