danstaver/template-hints

添加自定义模板提示参数名称的选项。

安装: 25

依赖: 0

建议者: 0

安全性: 0

星星: 0

观察者: 1

分支: 0

开放问题: 0

类型:magento2-module

1.0.2 2022-03-23 05:10 UTC

This package is auto-updated.

Last update: 2024-09-23 10:58:57 UTC


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个字符的值,如 1y,使得激活提示变得更快。

?/th=1?/templatehints=magento