[英]Including template .phtml between HEAD tags in magento
我需要在標簽之間包含一些.phtml
模板
<head> </head>
我的模板使用PHP生成了一些JS代碼,因此我需要.phtml
模板而不是簡單
<action method="addJs"><script>theme/script.js </script> </action>
謝謝
添加到您的xml:
<reference name="head">
<action method="addItem"><type>skin_js</type><name>js/script.js</name><params/></action>
</reference>
並將您的腳本添加到skin/frontend/[template]/[package]/js/script.js
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.