FANDOM


local Footers = {}
local HF = require('Module:HF')
-- local L = require('Dev:List')
-- local getArgs = require('Dev:Arguments').getArgs
local imdb_title = require('Module:IMDb')._imdb_title
 
function Footers.episode( frame ) -- Called by {{Infobox/Episode}}
    local args = HF.getArgs(frame, { trim = true, removeBlanks = true })
	return Footers._episode( args )
end
 
function Footers._episode( field )-- Called by {{Infobox episode}}
	local cat = {}
	local links = { class = 'hwrap plainlinks' }
	local _SK = ''
	if not HF.isempty(field['SORTKEY']) then _SK = '|' .. field['SORTKEY'] end
	table.insert( cat, '[[Category:'..'Episodes'.._SK..']]' )
	table.insert( links, 
	    string.format('[[:%s:%s|%s]]',
	        'Category',
	        'Episodes',
	        'Episodes'
	    )
    )
	if not HF.isempty(field['IMDb']) then
	    table.insert( links, imdb_title{id = field['IMDb'], title='IMDb'} )
    end
    if not HF.isempty(field['Season']) then
	    table.insert( cat,
	        string.format('[[%s:%s %s]]',
	            'Category',
	            'Episodes/Season',
	            field['Season']
            )
        )
    end
 
	return HF.L.makeList( 'horizontal' , links ) .. table.concat( cat )
end
 
return Footers

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.