Module:Handbook: Difference between revisions
No edit summary |
No edit summary |
||
| (2 intermediate revisions by the same user not shown) | |||
| Line 37: | Line 37: | ||
if args.about then | if args.about then | ||
args.about = lib.split(args.about, ';') | args.about = lib.split(args.about, ';') | ||
if title.rootText == 'Handbook | if title.rootText == 'Handbook' then | ||
out:tag('i'):wikitext(require('Module:Hatnote').main(args.about)) | out:tag('i'):wikitext(require('Module:Hatnote').main(args.about)) | ||
end | end | ||
| Line 43: | Line 43: | ||
local size = args.size or '200px' | local size = args.size or '200px' | ||
if (title.rootText == 'Handbook | if (title.rootText == 'Handbook') then | ||
size = '400px' | size = '400px' | ||
end | end | ||
| 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 | if (not args['table'] and title.baseText == 'Handbook' and (subpage ~= nil and not lib.inArray({ 'Planar Travel', 'Nexus Battle', 'Uncategorized' }, 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 140: | Line 140: | ||
count, | count, | ||
"'''", | "'''", | ||
(count == 1 and '[[Handbook Entry]] ' or '[[Handbook Entries]] '), | (count == 1 and ' [[Handbook Entry]] ' or ' [[Handbook Entries]] '), | ||
(args[1] and ('that match' .. (count == 1 and 'es' or '') .. ' the category selection:') or ' are in ' .. title) | (args[1] and ('that match' .. (count == 1 and 'es' or '') .. ' the category selection:') or ' are in ' .. title) | ||
) | ) | ||