Module:Portal-inline
தோற்றம்
Documentation for this module may be created at Module:Portal-inline/doc
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('<span style="font-size:100%;" class="error">error: missing portal name.</span></strong>[[Category:Portal templates without a parameter]]')
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('[[Category:Portal templates all redlinked portals]]')
return tostring(root)
end
root:wikitext('[[Category:Portal templates all redlinked portals]]')
end
-- display portal-inline content
end