magento开启模板路径提示

   magento模板开发很方便,多得益于这个模板路径提示,今天我给大家图文讲解下如何开启magento模板路径的提示。这对于做magento模板进行文件的定位是很有帮助的。

 第一步,首先进入后台的system—》configuration,所有的设置都是在这个里面设置的。

  第二步,也是很多人都不知道的一步,将左上方的这个“Current Configuration Scope”选到main website

hellokeykey.com magento模板路径提示

第三步,在这页面左栏下面的,进入developer里面进行设置

hellokeykey.com magento developer

第四步,在新打开的页面里有如下内容,将Debug中的Template Path Hints设置为yes,然后点击保存,如下图。

大家可以试下这个选项卡的第二个Add Block Name to Hints

hellokeykey.com magento template hints

 

好了,设置完成了,去magento的前台刷新下,就会出现如下的效果

hellokeykey.com 模板路径显示效果

如图,菜单的文件路径是frontend\default\default\template\catalog/navigation/top.phtml

           bread的文件路径是frontend\default\default\template\page/html/breadcrumbs.phtml

 

转载表明出处: hellokeykey.com 钥匙

《magento开启模板路径提示》有7个想法

  1. key ,你好!

    我原来程序和模板都调好了,在后台进行优化设置后,提示如下:

    Warning: include_once(Mage_Core_functions.php) [function.include-once]: failed to open stream: No such file or directory in /home/frank128/public_html/top-earphone.com/app/Mage.php on line 36

    Warning: include_once() [function.include]: Failed opening ‘Mage_Core_functions.php’ for inclusion (include_path=’/home/frankl28/public_html/top-earphone.com/includes/src:.:/usr/lib/php’) in /home/frank128/public_html/top-earphone.com/app/Mage.php on line 36

    Warning: include_once(Varien_Autoload.php) [function.include-once]: failed to open stream: No such file or directory in /home/frank128/public_html/top-earphone.com/app/Mage.php on line 37

    Warning: include_once() [function.include]: Failed opening ‘Varien_Autoload.php’ for inclusion (include_path=’/home/frank128/public_html/top-earphones.com/includes/src:.:/usr/lib/php’) in /home/frank128/public_html/top-earphone.com/app/Mage.php on line 37

    Fatal error: Class ‘Varien_Autoload’ not found in /home/frank128/public_html/top-earphone.com/app/Mage.php on line 53

    请问一下要怎么解决呢?网上是说路径权限有问题,但是我都设成了777,还是不行,不知道为什么.谢谢!

  2. key 兄,还有一个问题,我有一个产品类目页,每行只显示三个产品,但在搜索结果页面,却是每行显示4个产品,我想把他调成4个产品.不知道要怎么改?模板宽度足够.还望key 兄帮忙一下.

评论已关闭。