ഘടകം:InfoboxSchool
ദൃശ്യരൂപം
ഈ ഘടകത്തിന്റെ വിവരണം ഘടകം:InfoboxSchool/വിവരണം എന്ന താളിൽ നിർമ്മിക്കാവുന്നതാണ്
local p = {}
function p.getRevenueDistrict(frame)
local page = frame.args.page
if not page or page == '' then
return ''
end
local title = mw.title.new(page)
if not title then
return ''
end
local content = title:getContent()
if not content then
return ''
end
-- Match Infobox School and extract "റവന്യൂ ജില്ല"
local district = content:match('{{%s*Infobox School.-\n.-|%s*റവന്യൂ%s*ജില്ല%s*=%s*([^\n|}]+)')
if district then
district = mw.text.trim(district)
end
return district or ''
end
return p