Modul:Message box: Perbedaan antara revisi

←Membuat halaman berisi 'require('strict') local getArgs local yesno = require('Modul:Yesno') local lang = mw.language.getContentLanguage() local CONFIG_MODULE = 'Modul:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Fungsi pembantu ----------------------------------------------------------------------...'
Tanda: Suntingan perangkat seluler Suntingan peramban seluler
 
Tidak ada ringkasan suntingan
Tanda: Suntingan perangkat seluler Suntingan peramban seluler
 
(1 revisi perantara oleh pengguna yang sama tidak ditampilkan)
Baris 447: Baris 447:
function MessageBox:renderCategories()
function MessageBox:renderCategories()
if not self.hasCategories then
if not self.hasCategories then
-- No categories added, no need to pass them to Category handler so,
-- if it was invoked, it would return the empty string.
-- So we shortcut and return the empty string.
return ""
return ""
end
end
-- Convert category tables to strings and pass them through
-- Menggunakan ._main karena kita mengirimkan tabel 'args' langsung, bukan 'frame'
-- [[Module:Category handler]].
return require('Modul:Category handler')._main({
return require('Modul:Category handler')._main{
main = table.concat(self.categories[0] or {}),
main = table.concat(self.categories[0] or {}),
template = table.concat(self.categories[10] or {}),
template = table.concat(self.categories[10] or {}),
Baris 460: Baris 456:
nocat = self.args.nocat,
nocat = self.args.nocat,
page = self.args.page
page = self.args.page
}
})
end
end