Template:Navbox/doc:修订间差异
跳转到导航
跳转到搜索
创建页面,内容为“{{Uses_Lua|模块:Navbox}} <!-- 在本行下編輯模板說明 --> 本模板可相对快速地建立一个导航模板,它配备了默认样式,这些样式能对付大多数导航模板。不建议改变默认样式,尽管这是可以的。为了导航模板的标准化,也为了方便使用,强烈建议使用这个模板,或者它的「Navbox系列」姊妹模板中的某一个。 ==用法== 请移除置空不用的参…” |
页面内容被替换为“{{Documentation header}} {{lua}} This template creates a navbox template, which can be included at the bottom of each page that is linked in the template. == Usage == {| class="wikitable" width="100%" |- ! Parameter(s) ! Usage ! style="width: 9%" | Default value(s) |- | {{{name}}} | Should be identical to the template's name without namespace. Does nothing unless {{{1}}} is set to navbar or navbar-mini. | {{{name}}} |- | {{{title}}}…” 标签:替换 |
||
第1行: | 第1行: | ||
{{ | {{Documentation header}} | ||
{{lua}} | |||
This template creates a [[wp:navigation template|navbox template]], which can be included at the bottom of each page that is linked in the template. | |||
== | == Usage == | ||
{| class="wikitable" width="100%" | |||
|- | |||
! Parameter(s) | |||
! Usage | |||
! style="width: 9%" | Default value(s) | |||
|- | |||
| {{{name}}} | |||
| Should be identical to the template's name without namespace. Does nothing unless {{{1}}} is set to navbar or navbar-mini. | |||
| {{{name}}} | |||
|- | |||
| {{{title}}} | |||
| Sets the title used at the top of the navbox. | |||
| {{{title}}} | |||
|- | |||
| {{{class}}} | |||
| Allows you to change the collapsing state of the table. [[mw:Manual:Collapsible elements#Common.js script (Before 1.18)|More info]]. Collapsed is removed while on pages in the Template namespace, to make editing easier. | |||
| collapsible collapsed | |||
|- | |||
| {{{1}}} | |||
| '''navbar:''' Will add a navigation bar giving links to view, discuss, and edit the template. Requires {{{name}}} to be set. '''Note:''' This will only correctly link to templates that are actually in the Template: namespace. | |||
'''navbar-mini:''' Identical to navbar, except the titles of the links are v, d, and e instead of view, discuss, and edit. | |||
{{ | | ''None'' | ||
| | |- | ||
| | | {{{titlestyle}}} | ||
| | | Allows custom styling for the title area | ||
| | | ''None'' | ||
|- | |||
| {{{bodystyle}}} | |||
| Allows custom styling for the body area | |||
| ''None'' | |||
|- | |||
| {{{groupstyle}}} | |||
| Allows custom styling for the group area | |||
| ''None'' | |||
|- | |||
| {{{liststyle}}} | |||
| Allows custom styling for the list area | |||
| ''None'' | |||
|- | |||
| {{{group''n''}}} | |||
| Adds the heading for the group number specified | |||
| {{{group1}}} = {{{group1}}}<br>{{{group2+}}} = ''None'' | |||
|- | |||
| {{{list''n''}}} | |||
| Adds text for the list number specified | |||
| {{{list1}}} = {{{list1}}}<br>{{{list2+}}} = ''None'' | |||
|} | |||
== Example == | |||
<pre> | <pre> | ||
{{navbox | |||
| title = Example | |||
| title = | |||
| group1 = Example group 1 | |||
| list1 = Example list 1 | |||
| group2 = Example group 2 | |||
| list2 = Text above a child navbox | |||
{{navbox | |||
| group1 = Example Sub-group 1 | |||
| | | list1 = Example Sub-list 1 | ||
|group1 = | |||
|list1 = | |||
| group2 = Example Sub-group 2 | |||
| list2 = Example Sub-list 2<br>Taking up two lines | |||
| group3 = Example Sub-group 3 | |||
| list3 = Example Sub-list 3 | |||
|list3 = | |||
}} | }} | ||
* Horizontal list | |||
* Under a child navbox | |||
* | |||
* | |||
}} | }} | ||
</pre> | </pre> | ||
{{navbox | |||
| title = Example | |||
| group1 = Example group 1 | |||
| list1 = Example list 1 | |||
| | |||
| | |||
|group1 = | | group2 = Example group 2 | ||
| list1 = | | list2 = Text above a child navbox | ||
{{navbox | |||
| group1 = Example Sub-group 1 | |||
| list1 = Example Sub-list 1 | |||
|group2 = | | group2 = Example Sub-group 2 | ||
| list2 = | | list2 = Example Sub-list 2<br>Taking up two lines | ||
|group3 = | | group3 = Example Sub-group 3 | ||
| list3 = | | list3 = Example Sub-list 3 | ||
}} | }} | ||
* Horizontal list | |||
* Under a child navbox | |||
* | |||
* | |||
}} | }} | ||
== See also == | |||
* {{tl|SimpleNavbox}} | |||
<includeonly> | |||
< | |||
</includeonly> | |||
<noinclude> | |||
</noinclude> | |||
< | |||
2024年11月1日 (五) 13:37的版本
此模板使用了Module:Navbox,此脚本使用Lua编写。
更多详情,请参阅Wikipedia:Lua和Extension:Scribunto。
This template creates a navbox template, which can be included at the bottom of each page that is linked in the template.
Usage
Parameter(s) | Usage | Default value(s) |
---|---|---|
{{{name}}} | Should be identical to the template's name without namespace. Does nothing unless {{{1}}} is set to navbar or navbar-mini. | {{{name}}} |
{{{title}}} | Sets the title used at the top of the navbox. | {{{title}}} |
{{{class}}} | Allows you to change the collapsing state of the table. More info. Collapsed is removed while on pages in the Template namespace, to make editing easier. | collapsible collapsed |
{{{1}}} | navbar: Will add a navigation bar giving links to view, discuss, and edit the template. Requires {{{name}}} to be set. Note: This will only correctly link to templates that are actually in the Template: namespace.
navbar-mini: Identical to navbar, except the titles of the links are v, d, and e instead of view, discuss, and edit. |
None |
{{{titlestyle}}} | Allows custom styling for the title area | None |
{{{bodystyle}}} | Allows custom styling for the body area | None |
{{{groupstyle}}} | Allows custom styling for the group area | None |
{{{liststyle}}} | Allows custom styling for the list area | None |
{{{groupn}}} | Adds the heading for the group number specified | {{{group1}}} = {{{group1}}} {{{group2+}}} = None |
{{{listn}}} | Adds text for the list number specified | {{{list1}}} = {{{list1}}} {{{list2+}}} = None |
Example
{{navbox | title = Example | group1 = Example group 1 | list1 = Example list 1 | group2 = Example group 2 | list2 = Text above a child navbox {{navbox | group1 = Example Sub-group 1 | list1 = Example Sub-list 1 | group2 = Example Sub-group 2 | list2 = Example Sub-list 2<br>Taking up two lines | group3 = Example Sub-group 3 | list3 = Example Sub-list 3 }} * Horizontal list * Under a child navbox }}
|
See also
- {{SimpleNavbox}}