Skip to main content
drupalreleases

Use direct release data with your AI assistant.

Learn more

node_tree

No security coverage Under active development

Node tree shows the nodes of one or more node types as a tree that loads one level at a time, following the entity reference field each node carries to its parent. It suits any content where every item has one parent: a biological classification, a folder structure, an organisation chart, a table of contents.

What you get

  • A tree page (/node-tree by default, path and title configurable) with the tree on the left and the selected node, rendered in full, on the right. Every node has a permalink (/node-tree/node/<identifier>) that opens the tree down to it with the node selected; the browser history follows the selection.
  • A tree block that starts at the roots or, on a tree node's own page, opens with the node's lineage expanded and the node selected and scrolled into view inside the block, the rest still loading on demand. Selecting a node in the block opens its permalink. A second block is the panel the selection renders into, so you can compose a tree page of your own from the two.
  • JSON endpoints the tree loads from, usable by anything else: the published children of a node (or the roots), the tree opened down to one node with all siblings at each level, and a node rendered in its full view mode.
  • A lineage breadcrumb on a tree node's page (Home › root › … › parent › the node) and, optionally, on the pages of other node types that point at a tree node through a reference field, so a page about a node shows where the node sits.
  • Drush commands: node_tree:link-parents fills the parent reference of every node from a parent identifier field (after an import that carries identifiers but no references), with --bundle and --dry-run; node_tree:status shows the settings and the node counts per type.

Children are fetched with one indexed SQL statement per level, so a tree of tens of thousands of nodes opens at once; everything is cached with the node list of each configured type and the endpoints are plain cacheable GETs. An unpublished node, or one the visitor may not view, is never listed.

Requirements

  • Drupal 10.3 or 11, with the core Node module.
  • jqTree 1.6.2 (Apache-2.0), which is not part of the module because drupal.org does not allow Apache-2.0 code in a project's repository. Preferred: install it with Composer through the Asset Packagist mirror (npm-asset/jqtree, no Node or npm involved; the README has the commands), which puts the files under libraries/jqtree. Or place tree.jquery.js and jqtree.css there by hand, or do nothing and the module loads the library from the jsDelivr CDN at the tested version. The status report says which is in use and warns when the installed version differs from the tested one.

Configuration

Configuration › Content authoring › Node tree (/admin/config/content/node-tree, permission *Administer the node tree*). The module does nothing until at least one node type is chosen there.

  • Node types: the node types whose nodes form the tree.
  • Parent field: the entity reference field (to a node) that names a node's parent; a node without a value is a root. Default field_parent.
  • Identifier field: what identifies a node in the tree URLs and JSON, uuid (the default) or a field with one stable value per node (a GUID, a code).
  • Parent identifier field (optional): a field on the child holding its parent's identifier. The children of a node are then found through this field alone, and node_tree:link-parents fills the parent field from it.
  • Weight field (optional): an integer field that orders siblings before the title.
  • Describes field (optional): an entity reference field on other node types that points at the tree node a page is about, for the breadcrumb.
  • Tree page path and title, and whether the lineage breadcrumb is on.

The settings can also be set from a recipe with a simpleConfigUpdate action on node_tree.settings; the README shows one.

Where it comes from

Node tree is the classification tree of Taxanotes, a Drupal 11 successor to the Natural History Museum's Scratchpads for taxonomists, where it replaces the Scratchpads tinytax block, taxonomy page and taxonomy breadcrumb on sites of 30,000 taxa and more. Everything specific to taxonomy sits in Taxanotes' configuration; the module itself knows only nodes, a parent field and an identifier.

Maintainer: therobyouknow. Source: git.drupalcode.org/project/node_tree (branch 2.0.x); the Taxanotes platform on GitHub, github.com/taxanotes, uses it as a custom module in its web-explorer repository.

Drupal 10–11 PHP >=8.1

Ask your assistant about node_tree

Check compatibility with your Drupal and PHP version, maintenance and security coverage, from current release data. How it works

Depends on

Dependencies of the latest stable release

  • node Drupal core

Required by

Tracked projects that depend on this one

No tracked projects depend on this one yet.

Activity

Tracked releases
1
Tracked since
Nov 2026
Latest release
1 hour ago
Releases (12 mo)
1 ▲ from 0
Maintenance
Active

Releases

Version Type Core PHP Release date
2.0.2 Stable 10–11 PHP >=8.1 Nov 6, 2026