Help:Oltree format

From semantic-mediawiki.org
Jump to: navigation, search
Oltree format
Displays query results as a tree (nested HTML ordered lists)
Available languages
deenzh-hans
Further Information
Provided by: Semantic Result Formats
Added: 1.7.1
Removed: still supported
Requirements: none
Format name: oltree
Enabled by default: 
Indicates whether the result format is enabled by default upon installation of the respective extension.
yes
Authors: Stephan Gambke
Categories: misc
Group:
Table of Contents

↓ INFO ↓

The result format oltree, part of the Semantic Result Formats extension, can be used to display the query result as a tree, i.e. as an ordered (numbered) nested HTML list. This result format is very similar to the result format tree which is used to format query results as bulleted lists instead of numbered lists.

Parameters

Parameter Type Default Description
sep text , The separator for values
template text empty The name of a template with which to display the printouts
named args 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
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
import-annotation yes/no no <smw-paramdesc-import-annotation>
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

Example

A query for this format could look like:

{{#ask: [[Category:Place]] [[Located in::+]]
| format=oltree
| parent=Located in
}}

Result:

  1. Amsterdam
  2. Belleville
  3. England
    1. Greenwich
    2. London
  4. France
    1. Languedoc-Roussillon
    2. Paris
  5. Fresno
  6. Germany
    1. Baden-Württemberg
      1. Karlsruhe
      2. Stuttgart
    2. Berlin
    3. Cologne
    4. Frankfurt
    5. Munich
    6. Stuttgart
    7. Würzburg
  7. New York City
  8. New York City
  9. Porto
  10. Rome
  11. San Diego
  12. San Diego
  13. San Francisco
  14. Sydney
  15. Tokyo
  16. United Kingdom
    1. England
  17. Warsaw



This documentation page applies to all SMW versions from 1.7.1 to the most current version.
      Other languages: dezh-hans

Help:Oltree format en 1.7.1