silverstripe-australia/grouped-cms-menu
最新稳定版本:4.0.1
Composer 安装命令:
composer require silverstripe-australia/grouped-cms-menu
包简介
Allows you to group CMS menu items.
README 文档
README
This module allows you to group CMS menu items into nested lists which expand when hovered over. This is useful when there are so many CMS menu items that screen space becomes an issue.
Previous versions are available through the appropriate branch.
Basic Usage
In order to group CMS menu items together, define your menu groups in a config.yml file.
In the example below, CMSMain (Pages) and AssetAdmin (Files & Images) are grouped together under a "Content" heading.
SilverStripe\Admin\LeftAndMain: menu_groups: Content: children: - SilverStripe-CMS-Controllers-CMSPagesController - SilverStripe-AssetAdmin-Controller-AssetAdmin
Sort order
The items in each grouped menu will follow the order you set in your YML. The groups themselves will be inserted in the menu with a priority of 0, with other menu items appearing above or below depending on their existing priority. You can change the priority of a menu group like this:
SilverStripe\Admin\LeftAndMain: menu_groups: Other: priority: -500 children: - SilverStripe-Reports-ReportAdmin - SilverStripe-Admin-SecurityAdmin
Or you can "group" items by themselves to make any menu item follow the order you set in your configuration:
SilverStripe\Admin\LeftAndMain: menu_groups: SilverStripe\CMS\Controllers\CMSPagesController: children: - SilverStripe-CMS-Controllers-CMSPagesController Other: children: - SilverStripe-Reports-ReportAdmin - SilverStripe-Admin-SecurityAdmin
When you have larger menus, and/or multiple modules combining to the same menu, this may require something more consistent. In which case, you may sort your grouped menus alphabetically.
SilverStripe\Admin\LeftAndMain: menu_groups: SilverStripe\CMS\Controllers\CMSPagesController: children: - SilverStripe-CMS-Controllers-CMSPagesController Other: children: - SilverStripe-Reports-ReportAdmin - SilverStripe-Admin-SecurityAdmin menu_groups_alphabetical_sorting: true
Group icons
You can add a CSS class to groups for the purpose of adding an icon. The class name will be prefixed with 'font-icon-'. In the example below the same icon used for the Pages menu item will be used for the Content group:
SilverStripe\Admin\LeftAndMain: menu_groups: Content: icon: 'sitemap' children: - SilverStripe-CMS-Controllers-CMSPagesController - SilverStripe-AssetAdmin-Controller-AssetAdmin;
Translating group labels
A group label may be translated by providing a translation key as below (using the 'Other' group from above as an example)
langcode:
GroupedCmsMenuLabel:
Other: 'translated text'
If the group label has spaces, these will be converted to underscores for the key
langcode:
GroupedCmsMenuLabel:
Other_Label: 'translated text'
Requirements
- SilverStripe 4.0+ (See other branches for compatibility with older versions)
Project Links
Credits
- A massive thanks to Russ Michell (phptek) for upgrading this module to be SS4 compatible!
silverstripe-australia/grouped-cms-menu 适用场景与选型建议
silverstripe-australia/grouped-cms-menu 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 63.27k 次下载、GitHub Stars 达 32, 最近一次更新时间为 2014 年 12 月 05 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「menu」 「module」 「cms」 「group」 「silverstripe」 「grouping」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 silverstripe-australia/grouped-cms-menu 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 silverstripe-australia/grouped-cms-menu 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 silverstripe-australia/grouped-cms-menu 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A Symfony extension to get active class base on current bundle/controller/action
GraphQL authentication for your headless Craft CMS applications.
Set Links with a specific language parameter
Supercharged text field validation.
Integrate with Snipcart.
bootstrap select field module implementing http://silviomoreto.github.io/bootstrap-select/
统计信息
- 总下载量: 63.27k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 32
- 点击次数: 24
- 依赖项目数: 3
- 推荐数: 1
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2014-12-05