tentapress/menus
最新稳定版本:0.3.7
Composer 安装命令:
composer require tentapress/menus
包简介
README 文档
README
Navigation menu management for TentaPress.
Plugin Details
| Field | Value |
|---|---|
| ID | tentapress/menus |
| Version | 0.3.7 |
| Provider | TentaPress\Menus\MenusServiceProvider |
Goal
Allow users to define navigation menus and map them to theme locations.
Scope (v1)
- CRUD for menus and nested menu items.
- Assign menus to theme-defined locations.
- Render helper to output menus in themes.
- Permissions via
manage_menuscapability.
Features
- Create and manage navigation menus
- Assign menus to theme locations
- Add pages, posts, and custom links
- Drag-and-drop ordering
- Nested menu items
Dependencies
tentapress/userstentapress/pagestentapress/poststentapress/settings
Data model
tp_menusidnameslugcreated_by,updated_by- timestamps
tp_menu_itemsidmenu_idparent_id(nullable, for nesting)titleurltarget(nullable, e.g.,_blank)sort_ordermeta(json)- timestamps
tp_menu_locationsidlocation_key(string)menu_id(nullable)- timestamps
Admin Menu
| Label | Parent | Route | Capability | Icon | Position |
|---|---|---|---|---|---|
| Menus | Structure |
tp.menus.index |
manage_menus |
menu | 40 |
Admin UI (current)
- Menus list + create/edit screens.
- Menu editor with manual ordering (move up/down) and parent selection.
- Location assignments sourced from theme manifest
menu_locations.
Theme Integration
Themes define menu locations in tentapress.json:
"menu_locations": { "primary": "Primary Navigation", "footer": "Footer Navigation" }
Routes (current)
/admin/menuslist, create, edit, update, delete.
Open questions
- Do we want drag/drop nesting or async reordering in v1.1?
- Should we add auto-generated menus (e.g., pages list)?
Development
php artisan tp:plugins sync
php artisan tp:plugins enable tentapress/menus
统计信息
- 总下载量: 155
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-01-30