×
Create a new article
Write your page title here:
We currently have 142 articles on The Sonic the Hedgehog Wiki. Type your article name above or click on one of the titles below and start writing!



The Sonic the Hedgehog Wiki
Revision as of 19:44, 21 December 2024 by Sonic City (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This module is used for {{FA}}. Please see that template page for documentation.


-- This module implements {{FA}}.
local p = {}

function p.main()
    -- Return the HTML for the page status indicator
    local indicatorHtml = mw.getCurrentFrame():extensionTag {
        name = "indicator",
        content = '[[File:FA Emblem.png|link=The Sonic the Hedgehog Wiki:Featured Article|This is a Sonic the Hedgehog Wiki Featured Article]]',
        args = {
            name = "faImage"
        }
    }

    -- Check if the page is in the main namespace (NAMESPACENUMBER is 0)
    -- For more information, see [https://www.mediawiki.org/wiki/Help:Namespaces].
    local namespace = mw.title.getCurrentTitle().namespace

    -- Initialize the result with the indicator HTML
    local result = indicatorHtml

    -- Only add the category if the namespace is the main one.
    if namespace == 0 then
        result = result .. '[[Category:Featured Article]] [[Category:Pages using Lua-based templates]]'
    end

    return result
end

return p