Changes
		
		
		
		
		
		
		Jump to navigation
		Jump to search
		
    local self.pageTitle = getTitleObject(args.page ~= '' and args.page)    self.title = self.pageTitle or mw.title.getCurrentTitle()    local self.demospace = box.getNamespaceId(args.demospace ~= '' and args.demospace)or nil    self.nsid = box.getNamespaceId(self.demospace ) or self.title.namespace
    local chpage, chdemospace
    local currentTitle = mw.title.getCurrentTitle()
    if self.title ~= currentTitle then
        chpage = self.title.prefixedText
    end
    if self.nsid ~= currentTitle.namespace then
        chdemospace = self.nsid
    end
		
		
		
		
		
		
		
	
on second thoughts, I like this way of passing params to category handler better
function box:setTitle(args)
    -- Get the title object and the namespace.
end
    -- Convert category tables to strings and pass them through [[Module:Category handler]].
    self.categories = categoryHandler{
        main = tconcat(self.mainCats or {}),
        all = tconcat(self.allCats or {}),
        nocat = args.nocat,
        demospace = chdemospaceself.demospace,        page = chpageself.pageTitle and pageTitle.prefixedText or nil
    }
end