From WikiChip
Difference between revisions of "Module:chip"

Line 5: Line 5:
 
     infobox
 
     infobox
 
         :attr('class', 'chip-infobox')
 
         :attr('class', 'chip-infobox')
 +
 +
        :tag('tr')
 +
          :tag('td')
 +
            :attr('class', 'chip-infobox-header')
 +
            :attr('colspan', '2')
 +
            :wikitext(frame.args.title)
  
 
     return infobox
 
     return infobox
 
end
 
end
 
return p
 
return p

Revision as of 15:43, 3 January 2017

To add this template, simple add
{{chip}}
to the page and save. The chip infobox will have a small [Edit Values] button at the top-right corner which can be used to add values using a form.
local p = {}
function p.chip(frame)
    local infobox = mw.html.create('table')

    infobox
        :attr('class', 'chip-infobox')

        :tag('tr')
          :tag('td')
            :attr('class', 'chip-infobox-header')
            :attr('colspan', '2')
            :wikitext(frame.args.title)

    return infobox
end
return p