
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@0x30-ch/collection-tree
Advanced tools
A powerful Strapi 5 plugin that enables hierarchical tree structures for your collections with drag-and-drop sorting functionality. Perfect for managing categories, menus, nested content, and any data that benefits from hierarchical organization.
npm install @0x30-ch/collection-tree
# or
yarn add @0x30-ch/collection-tree
# or
pnpm add @0x30-ch/collection-tree
Navigate to Settings > Collection Tree in your Strapi admin panel to:
The plugin automatically adds these fields to enabled collections:
lft
- Left boundary for nested set modelrght
- Right boundary for nested set modelparent
- Parent relationship fieldchildren
- Children relationship field (virtual)tree
- Tree display path fieldAfter configuration, restart your Strapi server to apply the schema changes.
Retrieve your hierarchically organized data using the nested set left boundary:
// Get all items in tree order
const treeData = await strapi.entityService.findMany('api::category.category', {
sort: { lft: 'asc' }
});
# Get tree-ordered categories
GET /api/categories?sort=lft:ASC
# Filter by parent
GET /api/categories?sort=lft:ASC&filters[parent_document_id][id][$eq]=1
# Clone and install dependencies
git clone <repository-url>
cd strapi-collection-tree
pnpm install
# Start development
pnpm dev
# Build plugin
pnpm build
# Type checking
pnpm test:ts:front # Frontend types
pnpm test:ts:back # Backend types
packages/collection-tree/
├── admin/ # Frontend React components
│ ├── src/
│ │ ├── components/ # UI components (SortElement, SortNav)
│ │ ├── pages/ # Admin pages (Settings, SortPage)
│ │ ├── api/ # API client functions
│ │ ├── translations/ # i18n files
│ │ ├── styles/ # CSS styles
│ │ └── types/ # TypeScript definitions
│ └── tsconfig.json
├── server/ # Backend logic
│ ├── src/
│ │ ├── controllers/ # API controllers
│ │ ├── services/ # Business logic
│ │ ├── routes/ # Route definitions
│ │ ├── utils/ # Tree algorithms & utilities
│ │ └── config/ # Default configurations
│ └── tsconfig.json
└── package.json
The plugin uses the Nested Set Model for efficient tree operations:
git checkout -b feature/amazing-feature
)git commit -m 'Add amazing feature'
)git push origin feature/amazing-feature
)MIT License - see LICENSE file for details.
Made with ❤️ for the Strapi community
FAQs
Strapi plugin to easily sort your collections
The npm package @0x30-ch/collection-tree receives a total of 6 weekly downloads. As such, @0x30-ch/collection-tree popularity was classified as not popular.
We found that @0x30-ch/collection-tree demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.