Difference between revisions of "Module:Authority control files"
Jump to navigation
Jump to search
blackwiki>Tom.Reding m (--exclude ce) |
blackwiki>Tom.Reding m (--better) |
||
| Line 5: | Line 5: | ||
local conf = require( 'Module:Authority control' ).conf | local conf = require( 'Module:Authority control' ).conf | ||
local exclude = { | local exclude = { | ||
| − | ['MBAREA'] = ' | + | ['MBAREA'] = 'redundant [[MusicBrainz]] link', |
| − | ['MBI'] = ' | + | ['MBI'] = 'redundant [[MusicBrainz]] link', |
| − | ['MBL'] = ' | + | ['MBL'] = 'redundant [[MusicBrainz]] link', |
| − | ['MBP'] = ' | + | ['MBP'] = 'redundant [[MusicBrainz]] link', |
| − | ['MBRG'] = ' | + | ['MBRG'] = 'redundant [[MusicBrainz]] link', |
| − | ['MBS'] = ' | + | ['MBS'] = 'redundant [[MusicBrainz]] link', |
| − | ['MBW'] = ' | + | ['MBW'] = 'redundant [[MusicBrainz]] link', |
} | } | ||
Revision as of 16:03, 17 September 2019
| This module depends on the following other modules: |
About
This template is used to display wikilinks to all currently supported authority control IDs, automatically loaded from Module:Authority control's p.conf table.
Usage
See also
local p = {}
function p.files(frame)
local nav = require( 'Module:Navbox' )
local conf = require( 'Module:Authority control' ).conf
local exclude = {
['MBAREA'] = 'redundant [[MusicBrainz]] link',
['MBI'] = 'redundant [[MusicBrainz]] link',
['MBL'] = 'redundant [[MusicBrainz]] link',
['MBP'] = 'redundant [[MusicBrainz]] link',
['MBRG'] = 'redundant [[MusicBrainz]] link',
['MBS'] = 'redundant [[MusicBrainz]] link',
['MBW'] = 'redundant [[MusicBrainz]] link',
}
local elements = {}
for _, c in pairs( conf ) do
if exclude[c[1]] == nil then
table.insert( elements, c[2] )
end
end
return nav._navbox( {
name = 'Authority control files',
navboxclass = 'authority-control-files',
title = '[[Authority control|Authority control files]]',
bodyclass = 'hlist',
list1 = table.concat( elements, ' • ' )
} )
end
return p