danstaver / template-hints
添加自定义模板提示参数名称的选项。
1.0.2
2022-03-23 05:10 UTC
Requires
- magento/framework: *
- magento/module-developer: 100.4.*
README
安装:composer require danstaver/template-hints
添加自定义模板提示参数名称的选项
默认情况下,如果您启用 商店 -> 设置 -> 所有商店 -> 高级 -> 开发者 -> 调试 -> 启用带有URL参数的商店端提示
/ dev/debug/template_hints_storefront_show_with_parameter
,对于参数名称,您唯一的选择是 templatehints
,因为它在 \Magento\Developer\Model\TemplateEngine\Plugin\DebugHints::afterCreate
中是硬编码的,没有选项可以自定义参数名称。
对我来说,在调试时写这么多字母来启用提示非常烦人。这就是我创建此模块的原因,该模块在管理员面板中添加了 商店 -> 设置 -> 所有商店 -> 高级 -> 开发者 -> 调试 -> 参数名称
选项。默认情况下,它设置为 th
,但您当然可以将其设置为任何您想要的值。此外,将默认的 参数值
从默认的 magento
更改为1个字符的值,如 1
或 y
,使得激活提示变得更快。
?/th=1
与 ?/templatehints=magento