Difference between revisions of "Module:Authority control files"

From blackwiki
Jump to navigation Jump to search
blackwiki>Tom.Reding
(Works, now require('Module:Navbox'))
blackwiki>Tom.Reding
m (' * ')
Line 15: Line 15:
 
bodyclass  = 'hlist',
 
bodyclass  = 'hlist',
 
group1      = '[[Authority control|Authority control files]]',
 
group1      = '[[Authority control|Authority control files]]',
list1      = table.concat( elements )
+
list1      = table.concat( elements, ' * ' )
 
} )
 
} )
 
end
 
end
  
 
return p
 
return p

Revision as of 15:58, 1 September 2019


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

{{Authority control files}}

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