模板:Tlp
跳转到导航
跳转到搜索
页面Module:Documentation/styles.css没有内容。
File:Test Template Info-Icon - Version (2).svg 模板文档[查看] [编辑] [历史] [清除缓存]
package.lua第80行Lua错误:module 'Module:CGroup/core' not found
Template:Lua 表达式错误:预期外的<运算符。 Template:Tlnull,常缩写为Template:Tlnull,其功能是为模板名称的显示提供样式化格式,而无需实际调用该模板。生成的代码将以行内形式呈现。
参数[编辑]
除页面Template:Monospace/fonts.css没有内容。alttext外,所有命名参数均为开关型参数,它们通常可以省略,或通过赋值(如on、yes、true、include等)来激活。这些参数可按任意顺序排列(参见下方示例)。部分模板默认开启特定参数,所有可用的替代选项请查阅主表格。若某行显示效果与上一行完全相同,则表示当前模板不支持该选项,需改用Template:Tlx实现。
| 参数 | 功能描述 | 与{{example}}联用示例 | 默认激活的模板 |
|---|---|---|---|
| 默认状态(不使用任何辅助参数) | 脚本错误:没有“Tlg”这个模块。 | ||
| brace | 将双层大括号作为模板链接的一部分显示 | 脚本错误:没有“Tlg”这个模块。 | {{tlw}}/{{tn}} |
| braceinside | 将内层大括号作为模板链接的一部分显示 | 脚本错误:没有“Tlg”这个模块。 | |
| bold | 将模板链接/名称以粗体形式显示 | 脚本错误:没有“Tlg”这个模块。 | {{tlb}}、{{tlxb}} |
| code | 使用HTML <code>...</code>标签(以等宽字体)显示输出 |
脚本错误:没有“Tlg”这个模块。 | {{tlc}}、{{Template link expanded}}等 |
| italic | 将模板链接/名称之后的参数以斜体形式显示 | 脚本错误:没有“Tlg”这个模块。 | {{tlxi}} |
| kbd | 使用HTML <kbd>...</kbd>标签(等宽字体)显示输出 |
脚本错误:没有“Tlg”这个模块。 | |
| nolink | 不为模板名称添加内部链接 | 脚本错误:没有“Tlg”这个模块。 | {{tlf}}、{{tnull}} |
| nowrap | 在输出内容中禁用自动换行(nowrap) | 脚本错误:没有“Tlg”这个模块。 | {{tlf}}、{{tlp}} |
| nowrapname | 在模板名称/链接的输出中禁用自动换行(参数部分在必要时仍会换行) | 脚本错误:没有“Tlg”这个模块。 | |
| plaincode | 使用样式为“border:none; background:transparent;”的<code>...</code>标签 |
脚本错误:没有“Tlg”这个模块。 | {{tltss}} |
| subst | 在模板链接/名称前添加subst:前缀 | 脚本错误:没有“Tlg”这个模块。 | {{tls}}、{{tlxs}}等 |
alttext=[text] |
将模板链接的显示文本替换为自定义文本[text] |
脚本错误:没有“Tlg”这个模块。 | {{tla}} |
| _show_result | 同时显示调用该模板后的实际渲染结果 | 脚本错误:没有“Tlg”这个模块。 | |
| _expand | 添加指向该模板展开后页面的链接 | 脚本错误:没有“Tlg”这个模块。 | |
| a | 在模板代码前添加一个星号(*) | 脚本错误:没有“Tlg”这个模块。 |
匿名参数[编辑]
本模板可以接受不限数量的匿名参数,这些参数将作为模板链接(或名称)的附加参数一同显示;具体用法请参见下方示例。
范例[编辑]
- Note
- On the source sister projects, en.wikipedia and Meta, X0, X1, X2, …, X9 are sandbox templates for experimentation on involved templates that need be in template space. An auto-cleansing software facility exists that might be used to duplicate the facility on other Sister projects.
| 代码 | 输出 | 备注 |
|---|---|---|
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | |
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | 模板名称区分大小写 |
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | 首字母不区分大小写 |
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | |
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | <code>样式 |
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | plaincode样式 |
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | 链接/名称加粗 |
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | 参数以斜体显示 |
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | |
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | |
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | |
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | |
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | 可以组合使用多个参数设置 |
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | |
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | |
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | 可以组合使用命名参数和匿名参数…… |
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | ……以任意顺序…… |
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | ……甚至可以交错排列…… |
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | ……并形成多种不同的配置。 |
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | |
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | 若无参数,则自动代入当前页面名称 |
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | =符号无法直接使用 |
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | =可以正常使用 |
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | {{=}}可以正常使用 |
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | nowiki标签可以正常使用 |
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | 空参数同样有效,即使位于末尾 |
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 | 从右到左也可以正常处理 |
| 代码 | 输出 |
|---|---|
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 |
| 代码 | 输出 |
|---|---|
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 |
| 代码 | 输出 |
|---|---|
| Template:Tlx | 脚本错误:没有“Tlg”这个模块。 |
参见[编辑]
页面Template:Tnavbar-header/styles.css没有内容。| 连结形式 → | 含有连结 | 不含连结 | 含有连结并添加subst | 含有连结,连结包含括号 | 含有连结,显示其他文字 | 第一个|替换成:
| |
|---|---|---|---|---|---|---|---|
| 文字样式 ↓ | Template:Tlx选项1 | — | nolink=yes
|
subst=yes
|
braceinside=yes
|
alttext=FOO
|
不适用 |
| 正常 | — | Template:Tlx · Template:Tlx2 · Template:Tlx1, 2 | Template:Tlx2 · Template:Tlx | Template:Tlx · Template:Tlx | Template:Tlx | Template:Tlx | Template:Tlx3 |
代碼 code
|
code=yes ortt=yes
|
Template:Tlx | Template:Tlx2 · Template:Tlx | Template:Tlx | Template:Tlx3 | ||
代码 syntaxhighlight
|
不适用 | Template:Tlx | Template:Tlx | ||||
| 粗体 | bold=yes
|
Template:Tlx | |||||
粗體代碼 code
|
bold=yes|code=yes
|
Template:Tlx | |||||
斜體代碼 code
|
italic=yes|code=yes
|
Template:Tlx | |||||
注释:1. Template:Tlx是功能最齐全的模板,可选用任何配搭的文字样式、连结形式。
2. 用<span class="nowrap">...</span>标签将文字包围,防止断行。
- 各显示样式的比较
- Template:Tlx → 脚本错误:没有“Tlg”这个模块。
- Template:Tlx → 脚本错误:没有“Tlg”这个模块。
- Template:Tlx → 脚本错误:没有“Tlg”这个模块。
- 添加参数
- Template:Tlx →
|name=value - Template:Tlx →
|name=
RedirectT:VarSerif