Location of head.phtml in Magento
I am working with Magento and need to remove a Javascript that is being included in the <head>
section by default.
I am using a modified theme called modern. I am looking for head.phtml in:
app/design/frontend/default/modern/template/page/html/head.phtml
It does not exist. I do have header.phtml and footer.phtml. The code from header.phtml starts well after the <body>
of the document.
Where in the world would the head.phtml fil开发者_开发技巧e be?
Thanks in advance.
Goto Core theme files in Magento : app/design/frontend/base/default/template/page/html/head.phtml
copy this file from Base and Paste it to you theme, that is
app/design/frontend/default/modern/template/page/html/head.phtml
Now change here as per your requirement.
To Remove Javascripts goto its XML file i.e. page.xml.
Enjoy :)
I figured out what the problem was. I needed to look in the base directory under the default template:
app/design/frontend/base/default/template/page/html
I'm not exactly sure why though.
FWIW, JS should usually be removed by commenting/deleting relevant lines from the /layouts files in your theme, not the head template file itself. Unless someone added those script lines manually (naughty code monkey), of course.
精彩评论