Module:Experimental/Infobox/doc: Difference between revisions

Jump to navigation Jump to search
no edit summary
(Created page with "{{ToC|right}} ==Creating a template step-by-step== ===Import Module:Infobox=== <syntaxhighlight lang="lua"> local infobox = require('Module:Infobox') </syntaxhighlight> ===Unpack the frame arguments=== <syntaxhighlight lang="lua"> function p.main(frame) local args = frame:getParent().args ... </syntaxhighlight> ===Define an Infobox object=== {{Main|Module:Infobox#new}} <syntaxhighlight lang="lua"> local ret = infobox.new(args) </syntaxhighlight> ===Map your argume...")
 
No edit summary
 
Line 226: Line 226:
! <tt>numbers</tt>
! <tt>numbers</tt>
| Removes commas from the parameter and attempts to cast it to a <code>number</code>. If it works, the number is used, otherwise <code>? (edit)</code>
| Removes commas from the parameter and attempts to cast it to a <code>number</code>. If it works, the number is used, otherwise <code>? (edit)</code>
|-
! <tt>yesNo</tt>
| If the parameter is defined and yes or no, it will be used.
|-
|}
|}



Navigation menu