Module:Item Navbox: Difference between revisionsGive feedback
No edit summary |
No edit summary |
||
| Line 99: | Line 99: | ||
table.insert(wikitext, '<templatestyles src="User:Kai/mp/itemnavbox/styles.css"/>\n') | table.insert(wikitext, '<templatestyles src="User:Kai/mp/itemnavbox/styles.css"/>\n') | ||
-- Start building the {{Navbox}} call | -- Start building the main {{Navbox}} call | ||
table.insert(wikitext, '{{Navbox') | table.insert(wikitext, '{{Navbox') | ||
| Line 123: | Line 123: | ||
} | } | ||
-- Loop through categories and build | -- Loop through categories and build collapsed child navboxes for the vertical layout | ||
for i, cat in ipairs(categories) do | for i, cat in ipairs(categories) do | ||
-- Instead of |group=, we drop a full child navbox into the list to span the whole width | |||
table.insert(wikitext, '| list' .. i .. ' = {{Navbox|child') | table.insert(wikitext, '| list' .. i .. ' = {{Navbox|child') | ||
-- Creating the clickable headers for Weapon, Vitality, Spirit | |||
table.insert(wikitext, ' | title = ' .. cat.header) | |||
table.insert(wikitext, ' | state = collapsed') | |||
for j, tier in ipairs(tiers) do | for j, tier in ipairs(tiers) do | ||