Child navboxes Peusaneut

For additional examples, see the Navbox testcases page.

It is possible to place multiple navboxes within a single border with the use of the border parameter, or by specifying the first parameter to be "child". The basic code for doing this is as follows (which adds a subgroup for the first group/list area):

{{Navbox|name = {{subst:PAGENAME}}|title = Title|group1 = [optional]|list1 = {{Navbox|child   ...child navbox parameters... }}...}}

Subgroups example Peusaneut

Galat skrip: tidak ada modul tersebut "Labelled list hatnote".This example shows how subgroups can be used. It is recommended that one use {{ Navbox subgroup }}, but the same result can be reached by using {{ Navbox }} with border = child or the first unnamed parameter set to child. The evenodd parameter is used to reverse striping in some of the subgroups in order to get all of the stripes to line up properly. To remove the striping altogether, you can set liststyle = background:transparent; in each of the navboxes.

Multiple show/hides in a single container Peusaneut

Galat skrip: tidak ada modul tersebut "Labelled list hatnote".The example below is generated using a regular navbox for the main container, then its list1, list2, and list3 parameters each contain another navbox, with 1 = child set. The view (v), discuss (d), edit (e) navbar links are hidden using navbar = plain for each of them, or could be suppresed by just leaving out the name parameter (child navboxes do not require the name parameter to be set, unlike regular navboxes).

Relationship with other Navbox templates Peusaneut

This navbox template is specifically designed to work in conjunction with two other sister templates: {{ Navbox with columns }} and {{ Navbox with collapsible groups }}. All three of these templates share common parameters for consistency and ease of use (such parameters are marked with an asterisk (*) in the parameter descriptions list above). Most importantly, each template can be used as a child of one another (by using the |border=child parameter, or by specifying the first unnamed parameter to be child. For example: {{Navbox|child ...}}, {{Navbox with columns|child ...}} or {{Navbox with collapsible groups|child ...}}.

Technical details Peusaneut

  • This template uses CSS classes for most of its looks, thus it is fully skinnable.
  • Internally this meta template uses HTML markup instead of wiki markup for the table code. That is the usual way we make meta templates since wiki markup has several drawbacks. For instance it makes it harder to use parser functions and special characters in parameters.
  • For more technical details see the talk page, the CSS classes in MediaWiki:common.css and the collapsible table used to hide the box in MediaWiki:common.js.

Intricacies Peusaneut

  • The 2px wide border between groups and lists is drawn using the border-left property of the list cell. Thus, if you wish to change the background color of the template (for example bodystyle = background:purple;), then you'll need to make the border-left-color match the background color (i.e. liststyle = border-left-color:purple;). If you wish to have a border around each list cell, then the 2px border between the list cells and group cells will disappear; you'll have to come up with your own solution.
  • The list cell width is initially set to 100%. Thus, if you wish to manually set the width of group cells, you'll need to also specify the liststyle to have width:auto. If you wish to set the group width and use images, it's up to you to figure out the CSS in the groupstyle, liststyle, imagestyle, and imageleftstyle parameters to get everything to work correctly. Example of setting group width:
groupstyle = width:10em;
liststyle = width:auto;
  • Adjacent navboxes have only a 1 pixel border between them (except in IE6, which doesn't support the necessary CSS). If you set the top or bottom margin of style/bodystyle, then this will not work.
  • The default margin-left and margin-right of the outer navbox table are set to "auto;". If you wish to use navbox as a float, you need to manually set the margin-left and margin-right values, because the auto margins interfere with the float option. For example, add the following code to use the navbox as a float:
style = width:22em;float:right;margin-left:1em;margin-right:0em;

Copying to other projects or wikis? Peusaneut

Using this template on other wikis requires HTML Tidy to be turned on. A version that does not require Tidy can be found at Wikipedia:WikiProject Transwiki/Template:Navbox. (That version generally shouldn't be used here on the English Wikipedia.) More detailed information on copying {{Navbox}} to other wikis can be found on the talk page.

Known issues Peusaneut

  1. If the heading of the navbox spans more than one line, the second line will be displayed to the right of center. This can be avoided by hard-coding linebreaks with Seunaleuëk:Tag.
  2. Excessive use of the unsubstituted {{}} template as a delimiter, can in extreme cases cause the wiki page rendering to fail – there is a limit to the number of templates that can be used on a page (example Ketamine where the inclusion of eleven Navboxes with hundreds of bullets caused the page load not to complete, only the substitution of the bullets in those navboxes cured the problem). Use of the hlist class avoids the delimiter transclusion issue altogether, as the delimiters are rendered via CSS.

See also Peusaneut

  • {{ Navbar }} – Used for the navigation links in navbox.
  • {{ Nobold }} – To display text at normal font-weight within a context where the default font-weight is bold, e.g. header cells in tables.
  • {{ Sidebar }} – Vertically-aligned navigation (navbox) templates
  • {{ Nowrap begin }} – The recommended format for adding bullets, pipes, or dashes between list items. Deprecated; use the hlist class.
  • Seunaleuëk:Tn and Seunaleuëk:Tn – The dot and bullet commonly used to separate items in Navbox lists. Deprecated; use the hlist class.
  • {{ Flatlist }} – An accessible and semantically valid method (using an HTML list) of separating items in Navbox lists. Deprecated; use the hlist class.
  • Templat:Navbox/kasus uji – For additional examples of template code
  • Wikipedia:Line break handling – The how-to guide about how to handle word wraps (line breaks) on Wikipedia, such as the wrapping of the link lists used in navboxes.

Seunaleuëk:Templat navigasi

🔥 Top keywords: Ôn KeueMonakôRèvolusi industriBasa InggréhKolombiaTokohMeudeuhab HanafiMichael JacksonKusuih:Neuubah baroBeunantu:AsoëWikipedia:MeusapatWikipèdiaSurat Al-BaqarahHKusuih:MitaIrakAWikipedia:SandboxBeureukaih:Sura2.pdfYunaniOInternètVBTLPTompiESCZJOSDKJavaWWikipedia:Ureueng urôh