bsw/jbe@0: slot.set_layout("rss") bsw/jbe@0: bsw/jbe@0: local function rss_channel(channel) bsw/jbe@0: for key, val in pairs(channel) do bsw/jbe@0: slot.put("<", key, ">", encode.html(val), "") bsw/jbe@0: end bsw/jbe@0: end bsw/jbe@0: bsw/jbe@0: local function rss_item(item) bsw/jbe@0: slot.put("") bsw/jbe@0: for key, val in pairs(item) do bsw/jbe@0: slot.put("<", key, ">", encode.html(val), "") bsw/jbe@0: end bsw/jbe@0: slot.put("") bsw/jbe@0: end bsw/jbe@0: bsw/jbe@0: bsw/jbe@0: local issue = Issue:by_id(param.get_id()) bsw/jbe@0: bsw/jbe@0: rss_channel{ bsw/jbe@0: title = issue.area.name .. " :: Issue #" .. tostring(issue.id), bsw/jbe@0: language = "de", bsw/jbe@0: pubDate = "Tue, 8 Jul 2008 2:43:19" bsw/jbe@0: } bsw/jbe@0: bsw/jbe@0: for i, initiative in ipairs(issue.initiatives) do bsw/jbe@0: rss_item{ bsw/jbe@0: title = initiative.name, bsw/jbe@0: description = initiative.current_draft.content, bsw/jbe@0: link = "http://localhost/lf/initiative/show/" .. tostring(initiative.id) .. ".html", bsw/jbe@0: author = initiative.current_draft.author.name, bsw/jbe@0: guid = "guid", bsw/jbe@0: pubDate = "Tue, 8 Jul 2008 2:43:19" bsw/jbe@0: } bsw/jbe@0: end