树格式 | |
---|---|
以树(嵌套的HTML无序列表)的形式显示查询结果 | |
更多信息 | |
提供者: | Extension "Semantic Result Formats" |
添加版本: | 1.7.1 |
移除版本: | 仍支持 |
需求: | 无 |
格式名称: | tree |
启用?表明安装相应扩展时是否默认启用该结果格式。 | 是 |
作者: | Stephan Gambke |
分类: | 杂项 |
关键词 | |
目录 | |
结果格式tree(树),属于Semantic Result Formats扩展,可用于以树,即嵌套的HTML无序(符号)列表,的形式显示查询结果。此结果格式与结果格式oltree(有序列表树)非常相似,后者用于把查询结果以有序列表,而不是无序列表,的格式展示。
格式ultree(无序列表树)只是此结果格式的别名。
参数[edit]
参数 | 别名 | 类型 | 默认 | 说明 |
---|---|---|---|---|
propsep | - | 文本 | , | 结果记录的属性之间的分隔符 |
valuesep | - | 文本 | , | 用于结果属性值之间的分隔符 |
template | - | 文本 | 空白 | 输出显示模板的名称 |
named args | namedargs | 布尔值 | no | 请指定传递给该模板的变量 |
userparam | - | 文本 | 空白 | 使用模板时,向模板调用所传递的取值 |
class | - | 文本 | 空白 | 指定附加的层叠式样式表类 |
introtemplate | - | 文本 | 空白 | 用于在查询结果前显示内容的模板的名称 |
outrotemplate | - | 文本 | 空白 | 用于在查询结果后显示内容的模板的名称 |
sep | - | 文本 | , | 结果之间的分隔符 |
parent | - | 文本 | 空白 | 包含父页面的属性 |
root | - | 文本 | 空白 | 树的根页面 |
start level | - | 整数 | 1 | 树状结构的起始级别,例如,将其整合到另一树状结构之中 |
template arguments | - | 文本 | 空白 | 设置命名参数如何传递到模板 |
示例[edit]
此格式的查询可能如下所示:
{{#ask: [[Category:Place]] [[Located in::+]] |?Population |format=tree |parent=Located in }}
结果:
- Amsterdam (PopulationThe number of inhabitants of some geographical place.: 783,364)
- England (PopulationThe number of inhabitants of some geographical place.: 49,138,831)
- Greenwich
- London (PopulationThe number of inhabitants of some geographical place.: 7,825,200)
- France (PopulationThe number of inhabitants of some geographical place.: 64,102,000)
- Languedoc-Roussillon (PopulationThe number of inhabitants of some geographical place.: 2,520,000)
- Paris (PopulationThe number of inhabitants of some geographical place.: 2,234,105)
- Fresno
- Germany
- Baden-Württemberg
- Karlsruhe (PopulationThe number of inhabitants of some geographical place.: 294,761)
- Stuttgart (PopulationThe number of inhabitants of some geographical place.: 606,588)
- Berlin (PopulationThe number of inhabitants of some geographical place.: 3,520,061)
- Cologne (PopulationThe number of inhabitants of some geographical place.: 1,080,394)
- Frankfurt (PopulationThe number of inhabitants of some geographical place.: 679,664)
- Munich (PopulationThe number of inhabitants of some geographical place.: 1,353,186)
- Stuttgart (PopulationThe number of inhabitants of some geographical place.: 606,588)
- Würzburg (PopulationThe number of inhabitants of some geographical place.: 126,635)
- Baden-Württemberg
- New York City (PopulationThe number of inhabitants of some geographical place.: 8,175,000)
- New York City (PopulationThe number of inhabitants of some geographical place.: 8,175,000)
- Porto (PopulationThe number of inhabitants of some geographical place.: 237.584)
- Rome (PopulationThe number of inhabitants of some geographical place.: 2,761,477)
- San Diego (PopulationThe number of inhabitants of some geographical place.: 1,307,402)
- San Diego (PopulationThe number of inhabitants of some geographical place.: 1,307,402)
- San Francisco
- Sydney (PopulationThe number of inhabitants of some geographical place.: 4,575,532)
- Tokyo (PopulationThe number of inhabitants of some geographical place.: 8,967,665)
- United Kingdom (PopulationThe number of inhabitants of some geographical place.: 49,138,831)
- England (PopulationThe number of inhabitants of some geographical place.: 49,138,831)
- Greenwich
- London (PopulationThe number of inhabitants of some geographical place.: 7,825,200)
- England (PopulationThe number of inhabitants of some geographical place.: 49,138,831)
- Vienna (PopulationThe number of inhabitants of some geographical place.: 1,897, 1,888,776)
- Warsaw (PopulationThe number of inhabitants of some geographical place.: 1,720,398)
- 其他示例
另见[edit]
- TreeAndMenu扩展 - 此格式生成的无序列表可使用TreeAndMenu扩展进行转换
- 层次结构内继承帮助页面 - 包括使用此格式模拟层次结构继承的段落