imi/m2-breadcrumbs
Composer 安装命令:
composer require imi/m2-breadcrumbs
包简介
README 文档
README
Magento 2 (as Magento 1) has a lot of pages where breadcrumbs are missing.
some of them might not need them, but for others I think they might be needed.
Specially for the customer account pages.
Having breadcrumbs will improve the customer experience and will make the navigation easier.
This is based on the no-longer maintained https://github.com/tzyganu/m2-breadcrumbs
Installation
composer require imi/m2-breadcrumbs
You can find a list of supported pages in etc/frontend/breadcrumbs.xml.
If you don't want breadcrumbs for a specific page then you can manage the pages from Stores->Configuration->Easylife Breadcrumbs.
Extending
If you have other pages that you thing need breadcrumbs, create a module that depends on this one and add a file etc/frontedn/breadcrumbs.xml validated by the same xsd file Easylife/Breadcrumbs/etc/frontend/breadcrumbs_file.xsd where you can list your pages.
You can add a new page by adding this in your config file:
<page id="page_layout_handle" group="group_code"><!-- available groups are listed also in breadcrumbs.xml -->
<label>Store configuration label here</label>
<methods>
<method name="methodNameHere" sort="10" class="Class\Name\Here" /><!-- this will call the method Class\Name\Here::methodNameHere on the event controller_action_layout_render_before_page_layout_handle -->
<method name="otherMethodNameHere" sort="20" class="Class\Name\Here" /><!-- this will call the method Class\Name\Here::otherMethodNameHere on the event controller_action_layout_render_before_page_layout_handle -->
</methods>
</page>
If the class attribute is missing it will call the method from the Easylife\Breadcrumbs\Model\Observer class.
Educational
You can use this module for learning purposes. Is shows you how to create a config loader (I hope I've done it right).
It also shows you how to use di.xml. The observer for all events is Easylife\Breadcrumbs\Model\Observer\ObserverInterface and the di.xml file contains a preference for this interface.
<preference for="Easylife\Breadcrumbs\Model\Observer\ObserverInterface" type="Easylife\Breadcrumbs\Model\Observer" />
imi/m2-breadcrumbs 适用场景与选型建议
imi/m2-breadcrumbs 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3.93k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2019 年 04 月 15 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 imi/m2-breadcrumbs 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 imi/m2-breadcrumbs 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 3.93k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 6
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2019-04-15