【发布时间】:2014-08-06 17:45:34
【问题描述】:
我正在使用 magento 管理面板,我想像前端一样使用模板路径,我通过安装扩展进行了尝试,但它不起作用。请告诉我该怎么做?
【问题讨论】:
-
接受您认为有帮助的给定答案之一。它对其他人也有用
标签: magento
我正在使用 magento 管理面板,我想像前端一样使用模板路径,我通过安装扩展进行了尝试,但它不起作用。请告诉我该怎么做?
【问题讨论】:
标签: magento
转到
app > code > core > Mage > core > etc > system.xml
第 512 行
你可以看到这个
<template_hints translate="label">
<label>Template Path Hints</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<sort_order>20</sort_order>
<show_in_default>0</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
</template_hints>
将<show_in_default>更改为1并保存。
然后转到管理面板system > configuration > developer > Debug启用路径提示。
干杯
【讨论】:
app > code > core > Mage > core > etc > system.xml
INSERT INTO `core_config_data` (`scope`, `scope_id`, `path`, `value`)
VALUES ('websites', '0', 'dev/debug/template_hints', '1');
运行以下查询:
启用:
UPDATE core_config_data set value = 1 where scope = 'default' and scope_id = 0 and path ='dev/debug/template_hints'
禁用:
UPDATE core_config_data set value = 0 where scope = 'default' and scope_id = 0 and path ='dev/debug/template_hints'
完成后删除记录或如上所述设置值 0。不要忘记删除缓存
【讨论】:
在您的数据库中运行此查询
INSERT INTO core_config_data (scope, scope_id, path, value) VALUES ('default', 0, 'dev/debug/template_hints', 1),('default', 0, 'dev/debug/template_hints_blocks', 1);
【讨论】:
只需使用这个查询:
INSERT INTO core_config_data (scope, scope_id, path, value) VALUES ('default', 0, 'dev/debug/template_hints', 1), ('default', 0, 'dev/debug/template_hints_blocks', 1);
现在,要从管理面板中删除这些模板路径,只需触发以下两个查询:
delete from core_config_data where scope='default' and scope_id=0 and path='dev/debug/template_hints_blocks' and value=1
和
delete from core_config_data where scope='default' and scope_id=0 and path='dev/debug/template_hints' and value=1
并删除缓存插入查询和删除查询。
【讨论】: