etechflow/module-mega-menu
Composer 安装命令:
composer require etechflow/module-mega-menu
包简介
Theme-agnostic mega menu for Magento 2. Renders on Hyvä, Luma, Adobe Commerce default and custom themes via automatic runtime detection. Provides a JSON endpoint for lazy-loaded subcategory + featured-product data.
README 文档
README
A theme-agnostic mega menu for Magento 2.
At a glance
- Themes supported: Hyvä, Luma, Adobe Commerce default, and any custom theme inheriting from either.
- No jQuery dependency in the Luma variant — uses vanilla JS only, so it stays light and works in lean themes.
- No Knockout / RequireJS in the Hyvä variant — uses Alpine.js (already shipped with every Hyvä theme).
- Lazy-loaded data: dropdown subcategories + featured products are fetched on first hover from a 1-hour-cached JSON endpoint (
/megamenu/products/index?cat=<id>). - Auto theme detection at runtime — picks the right template per request.
Quick install
# from your Magento root
cp -r /path/to/Etechflow_MegaMenu app/code/Etechflow/MegaMenu
bin/magento module:enable Etechflow_MegaMenu
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush
See the top-level INSTALL.md in the distribution ZIP for full instructions (3 install methods, production-mode notes, troubleshooting).
Where to configure
Stores → Configuration → eTechFlow → Mega Menu:
- Master enable/disable
- Root Category ID (which category's children become the top-level menu items)
- Attach All Active Categories — Yes = every active category & sub-category auto-shows on enable, even ones set to "Include in Menu = No". No (default) = respect each category's flag. (Categories attach automatically either way — this just controls hidden ones.)
- Custom Menu Links — add your own top-level items (Label + URL/path + Sort). They merge in after the category items. Lets admins add custom links without touching categories.
- Max depth, featured products per category, mobile drill-down toggle, cache TTL
- Featured Products Source — choose what fills each dropdown's product column: Category Position (default) / Newest / Best Sellers / On Sale / Price Low→High / Price High→Low
- Dropdown Promo CMS Block — optional CMS block identifier rendered as a banner/column inside every dropdown (Content → Blocks). Leave blank for none.
Files
Etechflow_MegaMenu/
├── composer.json
├── registration.php
├── etc/ # module.xml, config.xml, acl.xml, routes.xml, system.xml, di.xml
├── Controller/ # JSON endpoint (megamenu/products/index)
├── Block/ # MegaMenu renderer (picks template by theme)
├── ViewModel/ # MenuData — top-level categories + theme detection
├── Model/Config.php # Typed config reader
├── view/frontend/ # Layout, both phtml variants, CSS, vanilla JS
└── i18n/en_US.csv
Override points
- Template: drop your own
mega-menu.phtml(ormega-menu-luma.phtml) underapp/design/frontend/<Vendor>/<theme>/Etechflow_MegaMenu/templates/. - CSS: override
mega-menu.cssthe same way. - Block: subclass
Etechflow\MegaMenu\Block\MegaMenuand rebind via your theme'sdi.xml. - Data: subclass
ViewModel\MenuDatafor custom queries or pre-baked menus.
Public route
GET /megamenu/products/index?cat=<id> → JSON:
{
"subcategories": [{"id":3,"name":"Range Rover","url":"https://…","count":42}, …],
"products": [{"name":"…","price":29.99,"price_formatted":"£29.99","url":"…","img":"…"}, …]
}
License
MIT — see LICENSE.md in the distribution.
etechflow/module-mega-menu 适用场景与选型建议
etechflow/module-mega-menu 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 06 月 11 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「navigation」 「magento」 「mega-menu」 「magento2」 「hyva」 「adobe-commerce」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 etechflow/module-mega-menu 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 etechflow/module-mega-menu 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 etechflow/module-mega-menu 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Mega Menu Contao Extension
A block to display a list of links to child pages, or pages in current level
A mega menu sidebar plugin for Filament 5
Magento 2 Social Login extension is designed for quick login to your Magento 2 store without procesing complex register steps
Magento - Clean up session extension
Laravel Menu management
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 44
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-11