我在自定义模块中覆盖模板时遇到问题。我在前端安装了新主题。下面我创建了文件:
/etc/modules/Category_ImageProduct.xml:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<Category_ImageProduct>
<active>true</active>
<codePool>local</codePool>
<depends><Mage_Catalog/></depends>
</Category_ImageProduct>
</modules>
</config>
/app/code/local/Category/ImageProduct/etc/config.xml:
<?xml version="1.0" encoding="UTF-8"?>
<config>
<modules>
<Category_ImageProduct>
<version>0.0.1</version>
</Category_ImageProduct>
</modules>
<frontend>
<layout>
<updates>
<category_imageproduct_layout>
<file>category_imageproduct/category_imageproduct.xml</file>
</category_imageproduct_layout>
</updates>
</layout>
</frontend>
</config>
应用程序/设计/前端/ Evoque的/默认/布局/ category_imageproduct / category_imageproduct.xml:
<?xml version="1.0" encoding="UTF-8"?>
<layout version="0.0.1">
<default>
<reference name="ev_leftmenu">
<action method="setTemplate">
<template>category_imageproduct/leftmenu.phtml</template>
</action>
</reference>
</default>
</layout>
我想覆盖模板名称leftmenu.phtml,它在布局 /app/design/frontend/evoque/default/layout/local.xml 中的块中定义:
<?xml version="1.0"?>
<layout>
<default>
<reference name="left">
<block type="evoqueconfig/navigation" name="ev_leftmenu" template="evoque/leftmenu.phtml" before="-">
<block type="cms/block" name="ev_promotion_under_catalog">
<action method="setBlockId"><block_id>ev_promotion_under_catalog</block_id></action>
</block>
</block>
</reference>
</default>
</layout>
上面是布局文件 /app/design/frontend/evoque/default/layout/local.xml 中的一段代码。但仍然没有覆盖模板。我将文本添加到新模板以注意更改,但我没有看到任何更改。我该如何解决?