我一直在嘗試將現(xiàn)有的 magento 1.9 項(xiàng)目遷移到 ec2 服務(wù)器,其他所有內(nèi)容以及管理面板都已正確設(shè)置,但未加載head.phtml并this->getChildHtml('head')返回空字符串。頁(yè)面.xml<block type="page/html" name="root" output="toHtml" template="page/1column.phtml"> <block type="page/html_head" name="head" as="head"> <action method="addJs"><script>prototype/prototype.js</script></action> <action method="addJs"><script>lib/ccard.js</script></action> <action method="addJs"><script>prototype/validation.js</script></action> <action method="addJs"><script>scriptaculous/builder.js</script></action> <action method="addJs"><script>scriptaculous/effects.js</script></action> <ation method="addJs"><script>scriptaculous/dragdrop.js</script></action> <action method="addJs"><script>scriptaculous/controls.js</script></action> <action method="addJs"><script>scriptaculous/slider.js</script></action> <action method="addJs"><script>varien/js.js</script></action> <action method="addJs"><script>varien/form.js</script></action> <action method="addJs"><script>varien/menu.js</script></action> <action method="addJs"><script>mage/translate.js</script></action> <action method="addJs"><script>mage/cookies.js</script></action> </block>1列.phtml<head> <?php echo( $this->getChildHtml('head') )?></head>正如我們?cè)谙聢D中看到的,Head 標(biāo)簽沒(méi)有渲染。
GetChildHtml 方法返回頭塊的空字符串 - Magento 1.9
慕標(biāo)5832272
2023-09-15 18:34:25