Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Tree Bundle Laravel Package

umanit/tree-bundle

UmanitTreeBundle is a Symfony bundle for managing hierarchical data in Doctrine-backed applications, with tools for building, organizing, querying, and rendering tree structures. It helps developers add nested content and tree navigation with less boilerplate.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Install with composer require the package (auto-discovery should register its service provider); publish config and any admin assets with php artisan vendor:publish.
  • Look first at the docs updated in 0.3.2 — the README and docs/ now cover the SEO title resolution, tree form type, and Twig path helpers. Start with the “rendering SEO metadata” and “tree navigation” examples.
  • First practical use case: render the SEO title in your base layout. In 0.3.2 the SEO title separator changed from hyphen to pipe, so expect output like Page title | Site name rather than Page title - Site name. Use the package’s title resolver rather than hand-assembling strings.
  • If you use the admin tree UI, create a quick page and confirm the tree form loads; then verify a front-end route resolved through the tree path helper returns the expected URI.

Implementation Patterns

  • SEO title composition: Treat the title as a pipe-delimited chain. Build fallback segments (page title, site name, section) and let the package join them with |. Centralise this in a layout partial or Blade component so the separator change lives in one place.
  • Favourite keys for Title / Excerpt: Configure the resolution order explicitly. 0.3.2 makes favourite keys take precedence, so define which fields (e.g. seo_title, title, excerpt) should win rather than relying on implicit ordering. This is useful when a page has both a short title and a long SEO title.
  • Overriding TreeNodeType: Subclass or extend the tree node form type and override its query_builder. In Symfony-style form types this is typically done via configureOptions setting the query_builder default, or by overriding the option resolver. Register your custom type in the service container and use it in your admin form definitions to scope which nodes appear (e.g. only published pages).
  • Twig get_path: Use the Twig path helper for breadcrumbs and navigation menus. The 0.3.2 fix makes get_path behave correctly in URI contexts; if you previously worked around it with manual concatenation, remove that workaround and test with nested pages.
  • URI path retrieval: Use the URI helper to build canonical URLs and redirects. Prefer it over manually combining slugs so the 0.3.2 path fix applies consistently.
  • Integration tip: Keep SEO title rendering, tree form definitions, and Twig helpers in separate service/component layers. That way future separator or resolver changes do not ripple through admin and front-end code.

Gotchas and Tips

  • Hyphen-to-pipe is a visible output change. Any tests asserting Title - Site will fail. Update snapshots and any hard-coded meta tags. Search templates and seed data for hyphen-separated SEO titles.
  • Favourite keys now win. If you previously set both a generic title and a favourite-key field, the resolved Title / Excerpt may differ from before 0.3.2. Audit content that relies on fallback ordering, and write a resolver test with multiple keys present.
  • query_builder override: Make sure your override preserves the original option signature. If you pass a closure, it should accept the same arguments as the default builder. Test the admin tree with empty and populated datasets; a wrongly scoped query builder can silently return no nodes.
  • Twig helper availability: If get_path is undefined, confirm the Twig bridge/bundle is registered and the function is enabled in your Twig environment config. Clear Twig and application caches after upgrading — stale compiled templates are a common source of “fixed but still broken” behaviour.
  • URI path edge cases: After the 0.3.2 get path in uri fix, re-check pages with trailing slashes, home page roots, and multi-segment paths. The fix may change output for edge-case URIs.
  • Extension point: TreeNodeType is the right seam for custom tree filtering; avoid hacking the admin controller directly. For SEO output, prefer the package’s title resolver over string manipulation so future separator changes are contained.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums