novactive / ezmenumanagerbundle
管理菜单的捆绑包
v3.0.1
2024-06-27 15:23 UTC
Requires
- php: ^7.3 || ^8.0
- knplabs/knp-menu-bundle: *
This package is auto-updated.
Last update: 2024-08-31 14:02:53 UTC
README
这个仓库是我们所说的“子树分割”:主仓库中的一个目录的只读副本。Composer使用它来允许开发者依赖特定的捆绑包。
如果您想报告或贡献,您应该在主仓库中打开问题: https://github.com/Novactive/Nova-eZPlatform-Bundles
通过.md文件在此仓库中提供文档,但也在此打包: https://novactive.github.io/Nova-eZPlatform-Bundles/master/MenuManagerBundle/README.md.html
一个eZPlatform捆绑包,让您的贡献者可以管理他们网站的菜单。
特性
- 管理界面创建/编辑/删除菜单
- 从菜单编辑界面管理和组织链接
- 在发布内容时将ezpublish内容添加到菜单
安装
使用Composer
在您的composer.json中添加NovaeZMenuManagerBundle
composer require novactive/ezmenumanagerbundle
注册捆绑包
在您的应用的
Novactive\EzMenuManagerBundle\EzMenuManagerBundle::class => [ 'all'=> true ],
路由配置
添加以下路由配置
novactive.menu_manager:
resource: "@EzMenuManagerBundle/Controller/"
type: annotation
prefix: /
定义菜单类型
菜单类型通过以下siteaccess感知变量定义:
nova_menu_manager.default.menu_types: <identifier>: <string or translation key>
示例
nova_menu_manager.default.menu_types: main: menu.type.main footer: menu.type.footer
用法
首先在“菜单管理”界面创建一个新的菜单
在编辑菜单时,您将能够定义以下属性
- 名称:菜单的名称
- 根(位置ID):这用于确定发布内容时可供使用的菜单
- 项目:您可以在其中拖放、删除、编辑和创建菜单的链接
创建菜单后,您可以将“菜单项”字段类型添加到您想要添加链接到菜单的内容类型。
然后当发布具有“菜单项”字段类型的内容时,您可以选择将链接添加到哪个菜单。