17,230
edits
mNo edit summary |
(use Args.fromFrame which also pulls from the parent frame) |
||
Line 1: | Line 1: | ||
local Args = require( 'Module:Args' ) | |||
local Box = require( 'Module:Box' ).Box | local Box = require( 'Module:Box' ).Box | ||
local Lazy = require( 'Module:Lazy' ) -- may load: Tabs, Gallery | local Lazy = require( 'Module:Lazy' ) -- may load: Tabs, Gallery | ||
function getCategoryProps( categoryName ) | function getCategoryProps( categoryName ) | ||
Line 28: | Line 29: | ||
if getPageProps then | if getPageProps then | ||
local pageContent = mw.title.new( page.text ):getContent() | local pageContent = mw.title.new( page.text ):getContent() | ||
page.args = | page.args = Args.fromPageContent( pageContent, 'Cat%s*|%s*' .. categoryName ) | ||
else | else | ||
page.args = {} | page.args = {} | ||
Line 180: | Line 181: | ||
function mt.__index( table, key ) | function mt.__index( table, key ) | ||
return function ( frame ) | return function ( frame ) | ||
return table._main( key, frame | return table._main( key, Args.fromFrame( frame ) ) | ||
end | end | ||
end | end |