我必须解决前同事的Magento网站(1.9)中的问题。 该站点使用多个类别,但是在一个类别的商店中,不会显示菜单。 Magento使用EM0113主题。
我们试图在Magento后台发现这两者之间的区别是什么,但我们没有。
我看过CMS的文件,显然问题出在变量$ this-> getChildHtml('topMenu'),它在不显示菜单的情况下返回一个空字符串。
<?php if(Mage::getSingleton('customer/session')->isLoggedIn()): ?>
<div class="container_menu">
<div class="inner_menu">
<?php echo $this->getChildHtml('topMenu') ?>
</div>
</div>
<?php endif; ?>
在page.xml中,两种情况下的引用都是相同的:
<block type="core/text_list" name="top.menu" as="topMenu" translate="label">
<label>Navigation Bar</label>
<block type="page/html_topmenu" name="tensite.catalog.topnav" template="page/html/topmenu.phtml"/>
</block>
为什么不显示菜单?为什么在某些情况下$ this-> getChildHtml('topMenu')设置不正确?这个变量在哪里设置? 我应该在后台(在EM0113设置中)还是在文件中进行搜索?文件似乎没有被编辑...
致谢