Jump to content

Template:Navbox/doc: Difference between revisions

From wiki58
Adapt Fandom markup and media; preserve source history: https://local58.fandom.com/wiki/Template:Navbox/doc
Replace Fandom component markup with native Wikipedia classes; retain source parameters, content, and archived history
 
Line 1: Line 1:
;Description
;Description
:This template is used to create a basic navigation box. You can do so by calling the template, via the steps under "Syntax", but it is recommended to '''copy the code verbatim''' via the steps under "Navbox Creation".
:This template creates a native collapsible navigation box using locally mirrored Wikipedia styles. Its original <code>header</code> and <code>body</code> parameters remain unchanged.
;Navbox Creation
<inputbox>
type=create
prefix=Template:
preload=Template:Navbox
editintro=Template:Navbox/doc
buttonlabel=Make your navbox!
default = Navbox Foo
</inputbox>
#Think of a name for your navbox, like "Navbox Foo". Type it in the above field, press the button, and save the page immediately. Be ready to return to ''this'' page to see the rest of the instructions.
#Edit the resulting page in source mode.
#Replace <code>{{{header}}}</code> with the text you would like to appear in the header.
#Replace <code>{{{body}}}</code> with the text you would like to appear in the body.
#To add another section, copy these four lines of code immediately below the lines in the existing code that they resemble:
<pre>|-
! style="padding:0.2em 0.5em;" nowrap="nowrap" class="color1" | {{{header}}}
|-
| style="padding:0.2em 0.5em;" | {{{body}}}</pre>
 
Save the page once you have added as many sections as you needed, and filled them with content. You may also want to create a /doc subpage explaining that to call the resulting template, one must only type <code>{<nowiki/>{Navbox Foo}}</code>, or rather, whatever we decided to name the template in step 1.


;Syntax
;Syntax
 
<pre>{{Navbox
<pre>{{navbox
|header=Land of Bob
|header=Land of Bob
|body=This <nowiki>[[place]]</nowiki> and that <nowiki>[[place]]</nowiki>.
|body=This [[place]] and that [[place]].
}}</pre>
}}</pre>


:Results in...
;Example
 
{{Navbox
{{navbox
|header=Land of Bob
|header=Land of Bob
|body=This <nowiki>[[place]]</nowiki> and that <nowiki>[[place]]</nowiki>.
|body=This [[place]] and that [[place]].
}}
}}
;Creating another navigation template
:Create a template in the <code>Template:</code> namespace and call <code>Navbox</code> with its header and body. Use native wiki links and lists in the body. Do not copy Fandom colors or inline component styling.


<includeonly>[[Category:Templates|{{PAGENAME}}]][[Category:Templates/Navbox|{{PAGENAME}}]]</includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>
<includeonly>[[Category:Templates|{{PAGENAME}}]][[Category:Templates/Navbox|{{PAGENAME}}]]</includeonly><noinclude>[[Category:Template documentation|{{PAGENAME}}]]</noinclude>

Latest revision as of 17:59, 11 November 2026

Description
This template creates a native collapsible navigation box using locally mirrored Wikipedia styles. Its original header and body parameters remain unchanged.
Syntax
{{Navbox
|header=Land of Bob
|body=This [[place]] and that [[place]].
}}
Example
Creating another navigation template
Create a template in the Template: namespace and call Navbox with its header and body. Use native wiki links and lists in the body. Do not copy Fandom colors or inline component styling.