};
local rowIndex = 1  
local socialNetworksElements = collectLinks( socialNetworkProperties );
if ( #socialNetworksElements > 0 ) then
navboxData['group' .. rowIndex] = group1Label
navboxData['list' .. rowIndex] = table.concat( socialNetworksElements , ' · ' )
rowIndex = rowIndex + 1
end  
local textsElements = collectLinks( textsProperties );
if ( #textsElements > 0 ) then
navboxData['group' .. rowIndex] = group2Label
navboxData['list' .. rowIndex] = table.concat( textsElements , ' · ' )
rowIndex = rowIndex + 1
end  
local contentHostingElements = collectLinks( contentHostingProperties );
if ( #contentHostingElements > 0 ) then
navboxData['group' .. rowIndex] = group3Label
navboxData['list' .. rowIndex] = table.concat( contentHostingElements , ' · ' )
rowIndex = rowIndex + 1
end  
local themeProfilesElements = collectLinks( themeProfilesProperties );
if ( #themeProfilesElements > 0 ) then
navboxData['group' .. rowIndex] = group4Label
navboxData['list' .. rowIndex] = table.concat( themeProfilesElements , ' · ' )
rowIndex = rowIndex + 1
end  
local dictionaryElements = collectLinks( dictionaryProperties );
if ( #dictionaryElements > 0 ) then
navboxData['group' .. rowIndex] = group5Label
navboxData['list' .. rowIndex] = table.concat( dictionaryElements , ' · ' )
rowIndex = rowIndex + 1
end  
local authorityControlElements = collectLinks( authorityControl );
if ( #authorityControlElements > 0 ) then
navboxData['group' .. rowIndex] = group6Label
navboxData['list' .. rowIndex] = table.concat( authorityControlElements , ' · ' )
rowIndex = rowIndex + 1
end  
if ( rowIndex == 1 ) then
if ( mw.title.getCurrentTitle.namespace == 0 ) then
if ( categoryTemplateEmpty ) then
return ''
end
end
else
navboxData['group1'] = '<div><div></div>&nbsp;&nbsp;' .. navboxData['group1'] .. '</div>'
end  
local navbox = moduleNavbox._navbox( navboxData )
return navbox
end  
function p.renderDocumentation
local result = ''
result = result .. '|-\n'
result = result .. '! colspan=4 | ' .. group1Label .. '\n'
result = result .. '|-\n'
result = result .. renderDocumentationCategory( socialNetworkProperties );
result = result .. '|-\n'
result = result .. '! colspan=4 | ' .. group2Label .. '\n'
result = result .. '|-\n'
result = result .. renderDocumentationCategory( textsProperties );
result = result .. '|-\n'
result = result .. '! colspan=4 | ' .. group3Label .. '\n'
result = result .. '|-\n'
result = result .. renderDocumentationCategory( contentHostingProperties );
result = result .. '|-\n'
result = result .. '! colspan=4 | ' .. group4Label .. '\n'
result = result .. '|-\n'
result = result .. renderDocumentationCategory( themeProfilesProperties );
result = result .. '|-\n'
result = result .. '! colspan=4 | ' .. group5Label .. '\n'
result = result .. '|-\n'
result = result .. renderDocumentationCategory( dictionaryProperties );
result = result .. '|-\n'
result = result .. '! colspan=4 | ' .. group6Label .. '\n'
result = result .. '|-\n'
result = result .. renderDocumentationCategory( authorityControl );
return result;
end  
function renderDocumentationCategory( links )
local result = ''  
for _, params in pairs( links ) do
local resourceLabel = params[1]
local resourceId = params[2]
local category = params[4]
local optional
if ( params[5] or false ) then
optional = 'TRUE'
else
optional = 'FALSE'
end  
result = result .. '| ' .. resourceLabel .. '\n'
if string.match( resourceId, '^P' ) then
result = result .. '| ' .. resourceId .. '\n'
elseif string.match( resourceId, '^Q' ) then
result = result .. '| P553 / P554 / ' .. resourceId .. '\n'
else
result = result .. '| &nbsp; \n'
end  
if ( category ) then
result = result .. '| ' .. category .. '\n'
else
result = result .. '| &nbsp; \n'
end
result = result .. '| ' .. optional .. '\n'
result = result .. '|-\n'
end  
return result;
end  
return p