Editing Module:HeroData/navGive feedback
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
| Latest revision | Your text | ||
| Line 125: | Line 125: | ||
for _, hero in ipairs(heroes) do | for _, hero in ipairs(heroes) do | ||
-- Lua optimization: clean ternary fallback for page_title assignment | -- Lua optimization: clean ternary fallback for page_title assignment | ||
local page_title = subpage and (hero. | local page_title = subpage and (hero.name .. '/' .. subpage) or hero.name | ||
-- Skip redlinks entirely when enabled | -- Skip redlinks entirely when enabled | ||
| Line 131: | Line 131: | ||
local item | local item | ||
if subpage then | if subpage then | ||
item = string.format('{{PageRef|%s|alt_link=%s}}', hero. | item = string.format('{{PageRef|%s|alt_link=%s}}', hero.name, page_title) | ||
else | else | ||
item = string.format('{{HeroIcon|%s}}', hero. | item = string.format('{{HeroIcon|%s}}', hero.name) | ||
end | end | ||
table.insert(parts, item) | table.insert(parts, item) | ||
| Line 159: | Line 159: | ||
for _, hero in ipairs(heroes) do | for _, hero in ipairs(heroes) do | ||
table.insert(parts, string.format('File:%s%s|%s%s\n', hero. | table.insert(parts, string.format('File:%s%s|%s%s\n', hero.name, file_name, hero.name, description)) | ||
end | end | ||