Difference between revisions of "Template:Infobox"

From Cysteinome
Jump to: navigation, search
(Created page with "{{Infobox | name = {{subst:PAGENAME}} | title = Text in caption over infobox | subheader = Subheader of the infobox | header = (the rest of the infobox goes here) }}")
 
Line 1: Line 1:
{{Infobox
+
local p = {}
  | name = Infobox
+
   
| title     = Text in caption over infobox
+
function p.run()
| subheader  = Subheader of the infobox
+
local capiunto = require 'capiunto'
| header = (the rest of the infobox goes here)
+
return capiunto.create( {
}}
+
title = tostring(mw.title.getCurrentTitle()) ,
 +
top = 'Basic Information',
 +
topStyle = 'background:#cfc;',
 +
bottom = ''
 +
} )
 +
:addRow('Short Name:', 'PTP1B')
 +
:addRow('UNP ID','Helium')
 +
:addRow('Li','Lithium')
 +
 
 +
end
 +
 +
return p

Revision as of 04:20, 18 May 2018

local p = {}

function p.run() local capiunto = require 'capiunto' return capiunto.create( { title = tostring(mw.title.getCurrentTitle()) , top = 'Basic Information', topStyle = 'background:#cfc;', bottom = } ) :addRow('Short Name:', 'PTP1B') :addRow('UNP ID','Helium') :addRow('Li','Lithium')

end

return p