无论出于何种原因,我只是对Magento数据库的MySqlDump进行了将其导入到新数据库中,然后突然将模板路径提示启用,我该如何从命令行关闭?还是我需要在数据库中更改哪个表/列才能将其关闭?

谢谢!

有帮助吗?

解决方案

您可以通过运行以下查询将其关闭:

UPDATE core_config_data SET value = '0' WHERE path LIKE '%template_hints%';

运行查询后,请确保当您在Magento根中时也清洁VAR/CASCACHE DIRECTORY。 ((rm -rf var/cache/*)

享受 ;)

其他提示

替代方案是使用PhpStorm IDE和Magicento插件,它具有用于Magento开发的非常有用的工具,打开/关闭路径提示,清洁缓存也在那里。

http://www.jetbrains.com/phpstorm/

http://magicento.com/

将一些属性切换为true;

class Mage_Core_Block_Template extends Mage_Core_Block_Abstract
{
    ...
    //near the row 66-67
    protected static $_showTemplateHints = true;
    protected static $_showTemplateHintsBlocks = true;
    ...
}

如果外出使用n98-magerun2脚本 https://github.com/netz98/n98-magerun2

从网站root运行以下内容以启用提示

n98-magerun2.phar dev:template-hints enable

这是为了禁用

n98-magerun2.phar dev:template-hints disable

在2.2中,您可以运行命令行:

php bin/magento dev:template-hints:enable 

php bin/magento dev:template-hints:disable 
许可以下: CC-BY-SA归因
scroll top