Module:Portal-inline

local getImageName = require( 'Module:Portal' ).image

local p = {}

local function checkPortalExists(portal) return not (mw.title.makeTitle(100, portal).id == 0) end

function p._main(portal) -- If no portals have been specified, display an error and add the page to a tracking category. if not portal then root:wikitext(' error: missing portal name. ') return tostring(root) end if not pcall(checkPortalExists, portal) or not checkPortalExists(portal) then -- Getting here means a redlinked portal has been found if not ((args.redlinks == 'yes') or (args.redlinks == 'y') or (args.redlinks == 'true') or (args.redlinks == 'include')) then -- just return if redlinks is not "yes" or similar root:wikitext('') return tostring(root) end root:wikitext('') end -- display portal-inline content end