Open main menu
Documentation icon Template documentation[view] [edit] [history] [purge]


Template allowing to output trees from Wikidata content. Based on Module:Tree.

Usage

{{Tree|property=|items=|recursion=|lang=}}

Parameters

Parameter name Description Default value required or optional?

property The numeric identifier of the property to base the tree on ie the XX part in PXX. empty required
items The base item(s) identifiers use to start the tree. List of QXX identifiers separated by spaces. empty required
recursion Maximum height of the tree 10 optional
lang Language code in which the labels will be found en optional

Additional information

The template is intended to be used in the following namespaces: no namespace specified

The template is intended to be used by the following user groups: no user group specified

Symbols

Big one dot

Big one dot "•" means "end of the branch". There are no further child items for that branch.

Small three dots

Small three dots "…" means "child item abbreviated". There is further child item for that branch. But it is abbreviated. Because already exceeded recursion limit. If you want show abbreviated items, increase recursion number setting.

Infinity symbol and Upwards arrow

Infinity symbol and Upwards arrow "∞ ↑" means infinite loop is detected. Same item is linked with at sign "@", asterisk "*", or sharp "#".

Other symbols

At sign "@", asterisk "*", and sharp "#" are used when same item appears twice or more times in different branches of the tree. Same items are abbreviated by these symbols except last occurrence.

Huge tree

Huge tree sometimes exceeds the limit of "expensive parser function count" (w:en:WP:EXPENSIVE). As of 2017, maximum expensive parser function count is 500. When accessing one Wikidata item page through Lua function (for example mw.wikibase.getEntity()), it raises expensive parser function count by one. So it is not possible to render huge tree which includes over 500 items. If the count reaches over 500, this template returns error Lua error: too many expensive function calls. And automatically categorized into Category:Pages with too many expensive parser function calls. In such case, try decreasing recursion number setting for shortening tree.

You can check the current expensive parser function count of each page by following manner.

Go to "Edit" mode → "Show preview" → Scroll down to around the middle of the preview page → Click and open the "Parser profiling data:" table → Check Expensive parser function count shown there, like 142/500

Example

{{Tree|property=40|items=Q1154861|recursion=50}}

See also