Tree Models
Understanding Tree Item and Root models in Umbraco
UmbTreeItemModel
interface UmbTreeItemModel {
unique: string; // Identifier for selection, navigation, and API calls
entityType: string; // Must match Workspace meta.entityType for navigation
name: string; // Display name shown in the tree
hasChildren: boolean; // Shows expand arrow when true
isFolder: boolean; // Visual styling hint
icon?: string; // Icon name (e.g., 'icon-document', 'icon-folder')
parent?: { // Parent reference for hierarchy and breadcrumbs
unique: string; // Parent's identifier
entityType: string; // Parent's entity type
};
}Extending the Model
import type { UmbTreeItemModel } from '@umbraco-cms/backoffice/tree';
export interface MyTreeItemModel extends UmbTreeItemModel {
// Add custom properties
status: 'draft' | 'published';
lastModified: string;
}UmbTreeRootModel
Defining a Root Model
Entity Types
Related
Last updated
Was this helpful?