Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 file be?

Thanks in advance.

like image 532
30Stack Avatar asked Oct 06 '10 22:10

30Stack


People also ask

Where is header Phtml Magento?

The code from header. phtml starts well after the <body> of the document. Where in the world would the head.

How do you call a Phtml file in default XML in Magento 2?

Call phtml using block codelogin to magento admin. Open any cms page and write block code in content section. After using the block code phtml file will be called on cms page. If you want to call phtml file on all cms pages then you can create a layout file to achieve this.


Video Answer


2 Answers

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 :)

like image 181
aforankur Avatar answered Sep 22 '22 17:09

aforankur


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.

like image 25
30Stack Avatar answered Sep 21 '22 17:09

30Stack