我在/app/design/frontend/mytemplate/default/template/page/html/footer.cat.links.phtml添加布局块在Magento
创建一个.phtml文件,这在时刻仅包含1个html div,其中包含一些文本。
我想把这个添加到页脚,但我没有玩过布局xml。
所以,我打开了/app/design/frontend/mytemplate/default/layout/page.xml,并尝试添加:
<block type="catalog/navigation" name="footer.cat.links" as="footerCatLinks" template="page/html/footer.cat.links.phtml" />
(类型为 “目录/导航” 因为我打算要得到这个工作:http://www.magentocommerce.com/wiki/4_-_themes_and_template_customization/catalog/getting_and_using_categories_and_subcategories)
我把它只是页脚块像这里面:
<block type="page/html_footer" name="footer" as="footer" template="page/html/footer.phtml"><my block here></block>
然后在footer.phtml,我试图调用新的块用:
<?php $this->getChildHtml('footerCatLinks') ?>
我刷新缓存等,但它不能在footer.cat.links添加HTML DIV。 phtml当我在浏览器中查看。
我终于认为我是在Magento附近摸索了一下,但是从我对文档的理解中,这应该起作用!我有多不对?
page.xml中围绕您的块标记的布局处理是什么? –