Module:Navbox/doc: Difference between revisions

From Xenharmonic Wiki
Jump to navigation Jump to search
Ganaram inukshuk (talk | contribs)
update documentation
Ganaram inukshuk (talk | contribs)
No edit summary
Line 1: Line 1:
{{documentation|
{{documentation|
{{dochead|header='''Note:''' This module may be invoked directly by calling <code>_navbox(args)</code> or by using its corresponding template ([[Template:Navbox]]).}}{{lua|Arguments|Navbar|Template input utils|Yesno}}
{{dochead|header=none}}{{lua|Arguments|Navbar|Template input utils|Yesno}}
<p>'''Module:Navbox''' is a {{w|wp:lua|module}} that implements the {{tlx|Navbox}} template. Navbox templates can be made by using the template or by calling the <code>_navbox</code> function from another module.</p>


On other templates that use or generate navigation boxes, you can call <code>_navbox</code> (note the underscore in front). The <code>navbox</code> function (without the underscore) is used by [[Template:Navbox]] as a wrapper.
On templates, you can create a sidebar by using <code><nowiki>{{Navbox}}</nowiki></code>, which calls this module's wrapper function.


On other modules, you can include <syntaxhighlight inline lang="lua">local navbox = require("Module:Navbox")._navbox</syntaxhighlight> at or near the top.
On modules, you can include <syntaxhighlight inline lang="lua">local navbox = require("Module:Navbox")._navbox</syntaxhighlight> to create a navbox.{{clear}}
 
This template allows a {{w|wp:navigational template|navigation box}} to be set up relatively quickly by supplying it with one or more lists of links. It comes equipped with default styles that should work for most navigational templates. Changing the default styles is possible, but not recommended.


=== See also ===
=== See also ===
* [[Module:Navbar]]
* [[Module:Navbar]]
}}
}}

Revision as of 09:13, 15 October 2025

Module:Navbox is a module that implements the {{Navbox}} template. Navbox templates can be made by using the template or by calling the _navbox function from another module.

On templates, you can create a sidebar by using {{Navbox}}, which calls this module's wrapper function.

On modules, you can include local navbox = require("Module:Navbox")._navbox to create a navbox.

See also