Magento模板未呈现

时间:2012-08-07 13:53:05

标签: magento templates layout block

我正在尝试在我的系统上调试“搜索自动完成和建议”扩展程序。它可以在一个商店中正常工作,但不能在另一个商店中工作。

未呈现结果的模板。该块正在扩展Mage_Core_Block_Template,当我将调试打印添加到块的_prepareLayout()时,它正确显示。

正确呈现父模板(blank.phtml),但无论内容是什么,子模板(suggest.phtml)都不会显示任何内容。

这是父模板代码(blank.phtml):

<?php echo $this->getChildHtml('content') ?>

和布局更新:

<?xml version="1.0"?>
<layout version="0.1.0">
    <searchautocomplete_suggest_result>
        <reference name="root">
        <action method="setTemplate"><template>searchautocomplete/blank.phtml</template></action>
        </reference>
        <reference name="content">
            <block type="searchautocomplete/suggest" name="searchautocomplete" template="searchautocomplete/suggest.phtml" />
        </reference>
    </searchautocomplete_suggest_result>
</layout>

我用这个网址测试它:

/index.php/searchautocomplete/suggest/result/?q=something

可能是什么问题?


更新

安装我的商店的另一个副本并添加我的自定义后,此扩展程序似乎工作正常。 我将尝试比较旧安装与新安装并发布我的发现。

0 个答案:

没有答案
相关问题