Difference between revisions of "Module:Authority control files"
Jump to navigation
Jump to search
blackwiki>Tom.Reding (Automatically updating version of Template:Authority control files) |
blackwiki>Tom.Reding (Works, now require('Module:Navbox')) |
||
| Line 2: | Line 2: | ||
function p.files(frame) | function p.files(frame) | ||
| − | local conf = require( | + | local nav = require( 'Module:Navbox' ) |
| + | local conf = require( 'Module:Authority control' ).conf | ||
| − | local | + | local elements = {} |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
for _, c in pairs( conf ) do | for _, c in pairs( conf ) do | ||
| − | + | table.insert( elements, c[2] ) | |
end | end | ||
| − | return nav.. | + | return nav._navbox( { |
| + | name = 'Authority control files', | ||
| + | navboxclass = 'authority-control-files', | ||
| + | bodyclass = 'hlist', | ||
| + | group1 = '[[Authority control|Authority control files]]', | ||
| + | list1 = table.concat( elements ) | ||
| + | } ) | ||
end | end | ||
return p | return p | ||
Revision as of 15:57, 1 September 2019
| 30px | 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 elements = {}
for _, c in pairs( conf ) do
table.insert( elements, c[2] )
end
return nav._navbox( {
name = 'Authority control files',
navboxclass = 'authority-control-files',
bodyclass = 'hlist',
group1 = '[[Authority control|Authority control files]]',
list1 = table.concat( elements )
} )
end
return p