honl / magento2-templatehints
H&O Magento 2 高级模板提示模块
0.5.0
2023-07-27 07:48 UTC
Requires
- php: ~7.3||~7.4||^8.1
Replaces
- ho-nl/magento2-templatehints: 0.5.0
README
Ho_Templatehints 扩展了默认的 Magento 模板提示。
- 通过肌肉记忆轻松访问
?ath=1
。 - 显示 模板、AbstractBlocks(块)、容器 和 UI 组件 的提示。
- 无布局干扰:使用 CSS 外框代替其他 HTML 元素的边框,因此不会破坏布局。
安装
composer require --dev honl/magento2-templatehints
php bin/magento module:enable Ho_Templatehints
php bin/magento setup:upgrade
开发安装(启用 git)
composer require --dev honl/magento2-templatehints "dev-master"
php bin/magento module:enable Ho_Templatehints
php bin/magento setup:upgrade
配置 PHPStorm,允许远程调用
使用方法
- 将您的 Magento 2 安装设置为开发者模式(在生产模式时,请确保在开发者客户端限制中添加您的 IP 地址)。
- 将
?ath=1
添加到您的 URL 中以激活。 - 在您的 Chrome/Firefox/Safari/
IE开发者工具中打开控制台。 - 按住 ⇧(shift)
- 将鼠标悬停在您希望检查的元素上
- 哇!到处都是提示!
隐藏元素的提示
您无法显示隐藏元素的提示,为此有 hint($0)
//Select an element in the Elements panel in your devtools, it is now available with $0 hint($0)
内部工作原理
该模块向布局元素的根元素添加了一个额外的 HTML 属性。
鸣谢
灵感来源于 Aoe_TemplateHints,以及来自 H&O 的许多爱。
开发者
本模块由 H&O 团队开发。有关本模块的更多信息,请访问 H&O 网站:H&O Magento 2 高级模板提示模块