Editing Template:Navbox/doc
From Guild of Archivists
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 72: | Line 72: | ||
== Parameter descriptions == | == Parameter descriptions == | ||
The following is a complete list of parameters for using {{tl|Navbox}}. In most cases, the only required parameters are <code>name</code>, <code>title</code>, and <code>list1</code>, though [[Template:Navbox/doc#Child navboxes|child navboxes]] do not even require those to be set. | The following is a complete list of parameters for using {{tl|Navbox}}. In most cases, the only required parameters are <code>name</code>, <code>title</code>, and <code>list1</code>, though [[Template:Navbox/doc#Child navboxes|child navboxes]] do not even require those to be set. | ||
{{tl|Navbox}} shares numerous common parameter names as its sister templates {{tl|Navbox with columns}} and {{tl|Navbox with collapsible groups}} for consistency and ease of use. Parameters marked with an asterisk <nowiki>*</nowiki> are common to all three master templates. | |||
=== Setup parameters === | === Setup parameters === | ||
Line 207: | Line 209: | ||
:; ''innerstyle'' | :; ''innerstyle'' | ||
:: A very advanced parameter to be used ''only'' for advanced meta-templates employing the navbox. Internally, the navbox uses an outer table to draw the border, and then an inner table for everything else (title/above/groups/lists/below/images, etc.). The ''style''/''bodystyle'' parameter sets the style for the outer table, which the inner table inherits, but in advanced cases (meta-templates) it may be necessary to directly set the style for the inner table. This parameter provides access to that inner table so styles can be applied. Use at your own risk. | :: A very advanced parameter to be used ''only'' for advanced meta-templates employing the navbox. Internally, the navbox uses an outer table to draw the border, and then an inner table for everything else (title/above/groups/lists/below/images, etc.). The ''style''/''bodystyle'' parameter sets the style for the outer table, which the inner table inherits, but in advanced cases (meta-templates) it may be necessary to directly set the style for the inner table. This parameter provides access to that inner table so styles can be applied. Use at your own risk. | ||
====Microformats==== | |||
;bodyclass : This parameter is inserted into the "class" attribute for the infobox as a whole. | |||
;titleclass : This parameter is inserted into the "class" attribute for the infobox's title caption. | |||
This template supports the addition of microformat information. This is done by adding "class" attributes to various data cells, indicating what kind of information is contained within. To flag a navbox as containing [[hCard]] information about a person, for example, add the following parameter: | |||
<pre> | |||
|bodyclass = vcard | |||
</pre> | |||
''and'' | |||
<pre> | |||
|titleclass = fn | |||
</pre> | |||
''or'' (for example): | |||
<pre><nowiki> | |||
|title = The books of <span class="fn">[[Iain Banks]]</span> | |||
</nowiki></pre> | |||
...and so forth. | |||
== Layout of table == | == Layout of table == | ||
Line 273: | Line 299: | ||
*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: | *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: | ||
::<code>style = width:22em;float:right;margin-left:1em;margin-right:0em;</code> | ::<code>style = width:22em;float:right;margin-left:1em;margin-right:0em;</code> | ||
=== Copying to other projects or wikis? === | |||
Note that using this template on other wikis requires [[mw:Manual:$wgUseTidy|HTML Tidy]] to be turned on. A version that does not require Tidy can be found at [[wikipedia:Wikipedia:WikiProject Transwiki/Template:Navbox|Wikipedia:WikiProject Transwiki/Template:Navbox]]. More detailed information on copying {{tl|Navbox}} to other wikis can be found on this template's [[wikipedia:Template talk:Navbox|talk page on Wikipedia]]. | |||
<includeonly> | <includeonly> |