Tree format | |
---|---|
Displays query results as a tree (nested HTML bulleted lists) | |
Further Information | |
Provided by: | Extension "Semantic Result Formats" |
Added: | 1.7.1 |
Removed: | still supported |
Requirements: | none |
Format name: | tree |
Enabled? Indicates whether the result format is enabled by default upon installation of the respective extension. | yes |
Authors: | Stephan Gambke |
Categories: | misc |
Keywords | |
Table of Contents | |
Contents |
The result format tree, part of the Extension "Semantic Result Formats" extension, can be used to display the query result as a tree, i.e. as an unordered (bulleted) nested HTML list. This result format is very similar to the result format oltree which is used to format query results as numbered lists instead of bulleted lists.
The format ultree is just an alias of this result format.
Parameters[edit]
Parameter | Aliases | Type | Default | Description |
---|---|---|---|---|
propsep | - | text | , | The separator between the properties of a result entry |
valuesep | - | text | , | The separator between the values for a property of a result |
template | - | text | empty | The name of a template with which to display the printouts |
named args | namedargs | yes/no | no | Name the arguments passed to the template |
userparam | - | text | empty | A value passed into each template call, if a template is used |
class | - | text | empty | Specify an additional cascading style sheet class |
introtemplate | - | text | empty | The name of a template to display before the query results, if there are any |
outrotemplate | - | text | empty | The name of a template to display after the query results, if there are any |
sep | - | text | , | The separator between results |
parent | - | text | empty | The property containing the parent page |
root | - | text | empty | The root page of the tree |
start level | - | whole number | 1 | The start level of the tree, e.g. for integrating it into another tree |
template arguments | - | text | empty | Sets how the named arguments are passed to the template |
Example[edit]
A query for this format could look like:
{{#ask: [[Category:Place]] [[Located in::+]] |?Population |format=tree |parent=Located in }}
Result:
- 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)
- Other examples
See also[edit]
- TreeAndMenu extension - a bulleted list produced by this format can be transformed with the TreeAndMenu extension.
- Help page on inheritance in hierarchies - includes a section on using this format to mimic hierarchical inheritance