Module:Breadcrumbs

local p = {}

function p.breadcrumbs(frame) -- Get the category name from the template parameter local category = frame.args[1] or mw.title.getCurrentTitle.text -- Split the category name into an array of subcategories local categories = mw.text.split(category, "/") -- Build the breadcrumb links local links = {} for i, cat in ipairs(categories) do       local link = "" table.insert(links, link) end -- Combine the breadcrumb links into a string local breadcrumbs = table.concat(links, " » ") -- Return the breadcrumb trail return breadcrumbs end

return p