Module:Infobox road/sections/sandbox
Appearance
![]() | This is the module sandbox page for Module:Infobox road/sections (diff). |
![]() | This module is rated as ready for general use. It has reached a mature form and is thought to be relatively bug-free and ready for use wherever appropriate. It is ready to mention on help pages and other Wikipedia resources as an option for new users to learn. To reduce server load and bad output, it should be improved by sandbox testing rather than repeated trial-and-error editing. |
![]() | This module is subject to page protection. It is a highly visible module in use by a very large number of pages, or is substituted very frequently. Because vandalism or mistakes would affect many pages, and even trivial editing might cause substantial load on the servers, it is protected from editing. |
![]() | This Lua module is used on approximately 25,000 pages and changes may be widely noticed. Test changes in the module's /sandbox or /testcases subpages, or in your own module sandbox. Consider discussing changes on the talk page before implementing them. |
![]() | This module depends on the following other modules: |
![]() | This module's documentation is missing, inadequate, or does not accurately describe its functionality or the parameters in its code. Please help to expand and improve it. |
This module supports {{Infobox road}}. See that page for documentation.
local p = {}
function p.sections(frame)
local pframe = frame:getParent()
local config = frame.args -- the arguments passed BY the template, in the wikitext of the template itself
local args = pframe.args -- the arguments passed TO the template, in the wikitext that transcludes the template
local sectionModule = require "Module:Infobox road/sections"
local section = sectionModule._section
local data = {header1 = section(1, args), header2 = section(2, args), header3 = section(3, args), header4 = section(4, args)}
local infoboxModule = require 'Module:Infobox'
return infoboxModule.infobox(data)
end
return p