更改magento模板系统

时间:2011-06-16 07:22:02

标签: xml templates magento block

接下来的任务是: 我们需要更改模板系统逻辑,以便更容易构建模板。 例如: 请求:www.example.com/index.php 系统解析地址,输出应该是这样的:

    getChildHtml(header);
    getChildHtml(indexContent);
    getChildHtml(footer);

据我了解,我需要处理XML布局。如果我是正确的,我需要删除所有然后构建我自己的块逻辑?到那时magento会如何理解,例如当customer_logged_in需要占用一些块时,而customer_logged_in句柄不存在?

Block_Class文件如何与xml布局连接?

1 个答案:

答案 0 :(得分:0)

在布局中,当您声明一个块时,您可以设置其类型。这是块的类。 例如,如果你有 这个块的类是Mage_Core_Block_Template 或者如果是的话 该类是Mage_Checkout_Block_Cart。

希望这有帮助。