FANDOM


local CharacterInfoboxTitle = {}
local HF = require("Module:HF")
 
function CharacterInfoboxTitle.main( frame )
    local args = frame.args
    local title = args.Pagename
 
    if not HF.isempty(args.Title) then
        title = args.Title
    elseif not HF.isempty(args.CurrentAlias) then
        title = args.CurrentAlias
    elseif not HF.isempty(args.CurrentAliasRef) then
        title = args.CurrentAliasRef
    elseif not HF.isempty(args.RealName) then
        title = args.RealName
    end
 
    local link = '<span style="position:relative; float:right; font-size:70%;">[[File:Help.png|link=Help:Template Fields#Character Template|Character Template Help]]</span>'
    local titleObj = mw.title.new( title )
 
    if type(titleObj) ~= "nil" then
        if titleObj.exists then
            link = link .. HF.Link( title, "" )
        else
            link = link .. title
        end
    else
        link = link .. title
    end
 
    if HF.isempty( args.Death ) then
        link = link .. HF.CategoryLink( "Living Characters", args.Pagename, "" )
    else
        link = link .. HF.CategoryLink( "Deceased Characters", args.Pagename, "" )
    end
 
    return link
end
 
return CharacterInfoboxTitle

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.