- What is liberusoftware/module-cms-menus used for?
- It is a Laravel CMS module for Liberu applications that creates and manages database-backed navigation menus and nested menu items. It supports multi-level menus by location, admin CRUD screens, orderable items, and Blade-ready rendering for headers, footers, and custom link groups.
- How do I install liberusoftware/module-cms-menus in a Laravel app?
- Install it with Composer using the package name liberusoftware/module-cms-menus, then follow the Liberu CMS module registration and migration steps for your application. Because it stores menus in the database, you will need to run the package migrations before creating menus. Check the package README for the exact service provider or module discovery requirements.
- Does this Laravel CMS module support nested or multi-level menus?
- Yes. The module is designed for multi-level menus and nested menu items, so you can build parent and child navigation structures. Items are orderable, which lets you control the sequence within each menu and level. Menus are also grouped by location for rendering in different parts of a site.
- How do I create header and footer navigation menus with this package?
- Create a menu record for the location you need, such as header, footer, or a custom link group, then add and order its items through the admin CRUD screens. In your Blade templates, render the menu for that location using the module's rendering API. Keep location names consistent between your admin setup and templates.
- Is menu rendering permission-aware in Liberu CMS?
- Yes. The package is described as providing permission-aware rendering, so menu output can respect the permissions of the current user. This is useful for hiding links to areas a user cannot access. You should still configure and test your application's permissions to confirm the expected visibility.
- Can I manage menus and menu items from the admin panel?
- Yes. It includes admin CRUD screens for creating and managing menus and nested menu items, including ordering. That lets non-developers maintain navigation without editing templates. The resulting menus are database-backed and ready for Blade rendering.
- Which Laravel versions does module-cms-menus support?
- The exact Laravel versions are defined by the package's Composer constraints, so check its composer.json and the Liberu CMS version you are using before installing. The module follows Laravel package conventions, but compatibility can vary with major Laravel upgrades. Pin a known-good version and review the requirements when upgrading.
- How do I render a menu in a Blade template?
- The module provides Blade-ready rendering for menus by location, so you typically pass or reference the location you want to output. It then renders the stored nested items in their configured order. For the exact directive, component, or helper syntax, refer to the package README because the API is specific to this Laravel module.
- How do I test menu ordering and nested items in Laravel?
- Use Laravel feature tests with a test database, create menus and nested items, then assert their order and rendered output for each location. You can also test permission-aware rendering by acting as users with different permissions. Cover parent-child relationships and multiple locations to catch ordering and nesting issues.
- What are the production considerations for using this menu module?
- Before production, run the migrations, define your menu locations, and verify that admin permissions and front-end visibility match your application's access rules. Test Blade rendering for headers, footers, and custom groups, and check the query behavior for deeply nested menus if you render large navigation trees. Also pin the Composer version and review upgrade notes for your Laravel and Liberu CMS versions.