Module:Handbook: Difference between revisions

Kuhlau (talk | contribs)
draft
 
Kuhlau (talk | contribs)
No edit summary
Line 65: Line 65:
-- add categories if correct page
-- add categories if correct page
local subpage = args.title or title.subpageText
local subpage = args.title or title.subpageText
if (not args['table'] and title.baseText == 'Handbook Entry' and (subpage ~= nil and not lib.inArray({ 'Elements', 'Enemies', 'System', 'Adventure', 'Event', 'Quest', 'Uncategorized' }, subpage))) then
if (not args['table'] and title.baseText == 'Handbook Entry' and (subpage ~= nil and not lib.inArray({ 'Planar Travel', 'Nexus Battle' }, subpage))) then
local cat = mw.html.create()
local cat = mw.html.create()
cat:wikitext('[[Category:Handbook Entries|', subpage, ']]')
cat:wikitext('[[Category:Handbook Entries|', subpage, ']]')
Line 75: Line 75:
end
end
if lib.inArray({ 'Elements', 'Enemies', 'System', 'Adventure' }, args['type']) then
if lib.inArray({ 'Planar Travel', 'Nexus Battle' }, args['type']) then
cat:wikitext('[[Category:', args['type'], ' Handbook Entries|', subpage, ']]')
cat:wikitext('[[Category:', args['type'], ' Handbook Entries|', subpage, ']]')
if not args['sort'] then
if not args['sort'] then