Modul:Reihenabfrage: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Zeile 1: | Zeile 1: | ||
local p = {} | local p = {} | ||
− | function | + | function holeReihen(frame,artikel) |
− | + | local a=frame:callParserFunction( | |
+ | '#ask', | ||
+ | '[[-Has subobject::'..artikel..']]', | ||
+ | '?Reihe ist#=', | ||
+ | 'sep=€', | ||
+ | 'mainlabel=-' | ||
+ | ) | ||
+ | return a | ||
end | end | ||
Zeile 34: | Zeile 41: | ||
.." "..holeAttribut(frame,value,"Kurzbeschreibung") | .." "..holeAttribut(frame,value,"Kurzbeschreibung") | ||
.." "..holeAttribut(frame,value,"Wappen ist") | .." "..holeAttribut(frame,value,"Wappen ist") | ||
+ | .." "..holeReihen(frame,value) | ||
.."<br>" | .."<br>" | ||
end | end |
Version vom 12. April 2019, 13:55 Uhr
Die Dokumentation für dieses Modul kann unter Modul:Reihenabfrage/Doku erstellt werden
local p = {} function holeReihen(frame,artikel) local a=frame:callParserFunction( '#ask', '[[-Has subobject::'..artikel..']]', '?Reihe ist#=', 'sep=€', 'mainlabel=-' ) return a end function holeAttribut(frame,artikel,attribut) local a=frame:callParserFunction( '#ask', '[['..artikel..']]', '?'..attribut..'#=', 'mainlabel=-' ) return a end function holeGeschichten(frame) local s='<q>[[Geschichten:+]] OR [[Lieder:+]] OR [[Heroldartikel:+]]</q>' local a=frame:callParserFunction( '#ask',s, 'mainlabel=-', '?#=', 'sep=€', 'limit=10', 'searchlabel=', 'format=list', 'sort=Erstellt', 'order=desc' ) local r='' local t=mw.text.split(a,'€',true) for key,value in pairs(t) do r=r..value .." "..holeAttribut(frame,value,"Kurzbeschreibung") .." "..holeAttribut(frame,value,"Wappen ist") .." "..holeReihen(frame,value) .."<br>" end return r end function p.Abfrage(frame) return holeGeschichten(frame) end return p