Node
A Node object represents a single item in a navigation menu tree — a link, a linked Craft element, or a structural item such as a group or Dynamic node. When you work with nodes in Twig or PHP, you are usually dealing with a verbb\navigation\elements\Node object.
Properties
Node element ID
Linked Craft element ID (element-backed nodes)
Linked Craft element — lazy-loaded; use withLinkedElements() on the query to batch-load
Parent menu ID
Parent Menu element — use withMenu() on the query to batch-load
Full URL (linked element or custom)
URI portion relative to the site
Node title
Node type class name (e.g. verbb\navigation\nodetypes\Entry)
CSS classes string
Table of { attribute, value } rows
Per-site suffix (anchor path, query string)
Open in new window
_blank or empty string
Element status
Child nodes — wired in memory when hierarchy is enabled
Structure level
Node site variant
Node custom fields (on the menu’s node field layout) are available by handle like any Craft element.
Active State
Exact URL match
Current, path-section, or has active descendant
Descendant nav node is current (bool)
Underlying state object
Methods
HTML tag for this node type (a, span, …)
Display name for the node type
Full HTML anchor (or appropriate tag) with title
Rendered attribute string for custom markup
Element-backed node
Custom URL node
Passive (non-link) node
Site node
Group/column structural node
linkAttributes
<a {{ node.linkAttributes({
class: 'nav-link',
}) }}>{{ node.title }}</a>Merges node classes, target, rel, and custom attributes with any extras you pass.
customAttributes
This property contains the authored { attribute, value } rows. Use linkAttributes when rendering them into HTML so Navigation evaluates the values and applies its supported attribute rules.
Linked Element Fields
{% if node.element %}
{{ node.element.someFieldHandle }}
{% endif %}Use withLinkedElements() on the parent query to avoid N+1 loads.