မေႃႇၵျူး:RC by category
Appearance
လွင်ႈၸႂ်ႉတိုဝ်း
[မႄးထတ်း]Invoked by {{RC}}. The <DynamicPageList>
tag is provided by the DynamicPageList (Wikimedia) extension.
local p = {}
function p.show(frame)
local namespace = ""
local category = ""
if frame ~= nil then
if frame.args[1] ~= nil and frame.args[1] ~= "" then
category = mw.text.trim(frame.args[1])
else
category = mw.title.getCurrentTitle().text
end
else
category = mw.title.getCurrentTitle().text
end
local recent = mw.getCurrentFrame():callParserFunction{
name = "#tag",
args = {
"DynamicPageList",
"ပိူင်ထၢၼ်ႈ=" .. category .. "\n" ..
"namespace=" .. namespace .. "\n" ..
"count=10\n" ..
"mode=ordered\n" ..
"ordermethod=categoryadd\n" ..
"order=descending"
}
}
local oldest = mw.getCurrentFrame():callParserFunction{
name = "#tag",
args = {
"DynamicPageList",
"ပိူင်ထၢၼ်ႈ=" .. category .. "\n" ..
"namespace=" .. namespace .. "\n" ..
"count=10\n" ..
"mode=ordered\n" ..
"ordermethod=lastedit\n" ..
"order=descending"
}
}
return [=[
{| class="wikitable" style="float: right; clear: both; margin: 0 0 .5em 1em;"
! လွင်ႈၽိူမ်ႉသႂ်ႇထႅင်ႈလႃႈသုတ်း !! လွင်ႈမႄးၵုမ်းထႅင်ႈလႃႈသုတ်း
|-
| style="font-size:0.9em;" | ]=] .. recent .. [=[
| style="font-size:0.9em;" | ]=] .. oldest .. [=[
|}]=]
end
return p