Modulo:DTBase: differenze tra le versioni
Da Wikitrek.
Nessun oggetto della modifica |
Remove file name from list of back references |
||
| Riga 519: | Riga 519: | ||
-- See also here https://doc.semantic-mediawiki.org/md_content_extensions_SemanticScribunto_docs_mw_8smw_8getQueryResult.html | -- See also here https://doc.semantic-mediawiki.org/md_content_extensions_SemanticScribunto_docs_mw_8smw_8getQueryResult.html | ||
local AllBackReferences = {} | local AllBackReferences = {} | ||
local QueryResult = mw.smw.getQueryResult('[[Riferimento::' .. mw.title.getCurrentTitle().text .. ']]|?DataTrek ID|?Istanza') | local QueryResult = mw.smw.getQueryResult('[[Riferimento::' .. mw.title.getCurrentTitle().text .. ']]|?DataTrek ID|?Istanza') | ||
| Riga 554: | Riga 531: | ||
for k, v in pairs(QueryResult.results) do | for k, v in pairs(QueryResult.results) do | ||
if string.sub(v.fulltext, 1, 5) == "File:" then | if string.sub(v.fulltext, 1, 5) == "File:" then | ||
Row = "[[:" .. v.fulltext .. "]]" | --IF the back reference is a media, don't list it, but show the thumbnail only | ||
--Row = "[[:" .. v.fulltext .. "]]" | |||
ImagesList = ImagesList .. v.fulltext .. "|" .. frame:expandTemplate{ title = v.fulltext} .. string.char(10) | ImagesList = ImagesList .. v.fulltext .. "|" .. frame:expandTemplate{ title = v.fulltext} .. string.char(10) | ||
else | else | ||