Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/magento/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Magento childHtml块的精确位置(意外结果)_Magento - Fatal编程技术网

Magento childHtml块的精确位置(意外结果)

Magento childHtml块的精确位置(意外结果),magento,Magento,我正在尝试在另一个phtml页面中的特定位置放置一个新的phtml块,但我没有得到我预期的结果-任何建议都将不胜感激 具体来说,我在模块的xml布局文件中为购物车页面创建了一个新的childHtml块: <layout version="0.1.0"> <checkout_cart_index> <reference name="head"> <action method="addJs"><sc

我正在尝试在另一个phtml页面中的特定位置放置一个新的phtml块,但我没有得到我预期的结果-任何建议都将不胜感激

具体来说,我在模块的xml布局文件中为购物车页面创建了一个新的childHtml块:

<layout version="0.1.0">
    <checkout_cart_index>
        <reference name="head">
            <action method="addJs"><script>varien/product.js</script></action>
            <action method="addItem"><type>js_css</type><name>calendar/calendar-win2k-1.css</name><params/><!--<if/><condition>can_load_calendar_js</condition>--></action>
            <action method="addItem"><type>js</type><name>calendar/calendar.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
            <action method="addItem"><type>js</type><name>calendar/calendar-setup.js</name><!--<params/><if/><condition>can_load_calendar_js</condition>--></action>
        </reference>
        <reference name="content">
            <block type="delivery/frontend_checkout_cart_delivery" name="delivery.container" as="delivery" template="unleaded/delivery/checkout/cart/shipping/delivery.phtml"/>
            <block type="core/html_calendar" name="delivery_html_calendar" as="delivery_html_calendar" template="page/js/calendar.phtml"/>
        </reference>
    </checkout_cart_index>
</layout>
我想要/期望的是在插入块的地方看到块输出,但它是在页面的最底部输出的(参见屏幕截图)。我几乎可以肯定我的错误是基于xml/布局的错误,但我不知道是什么?

您可以从
checkout.cart.shipping
块中调用
getChildHtml()
,但可以将新块添加到
内容中。而不是

<reference name="content">

…您只需说出您的新模块将是的子模块

<reference name="checkout.cart.shipping">

谢谢!使
core/html\u日历
阻止
内容的子项
和我的
交付/前端(checkout)购物车(cart)交付
阻止
checkout.cart.shipping
的子项工作非常有魅力。我相信我以前尝试过将它的
用作
别名,但没有成功。再次感谢。
<reference name="checkout.cart.shipping">