我一直在尝试将现有的 magento 1.9 项目迁移到 ec2 服务器,其他所有内容以及管理面板都已正确设置,但未加载head.phtml并this->getChildHtml('head')返回空字符串。
页面.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>
正如我们在下图中看到的,Head 标签没有渲染。
幕布斯7119047
LEATH