Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Trouble getting Magento to recognise a javascript file
 
eluminous
Jr. Member
 
Avatar
Total Posts:  27
Joined:  2008-11-05
Victoria, Australia
 

Can anybody tell me if this is correct or not....

1. I have created custom folders inside the frontend/default folders of both the app and skin sections. I have a javascript file place in the js folder of the skin folder and have added a call to the page.xml file under the head section. I cant get the javascript file to be recognised and loaded via this method. What is the correct way to call the file? I assumed it would be in the same way you call the css files.

On the other, if I place it in an area and reference it with an absolute url, that’s the only way I can get it to work.

2. If I wanted all sections of the site to load into a custom 2columns-right.phtml layout, what is the correct method for locating all files that will need to be changed to the correct layout?

 
Magento Community Magento Community
Magento Community
Magento Community
 
eluminous
Jr. Member
 
Avatar
Total Posts:  27
Joined:  2008-11-05
Victoria, Australia
 

Let me clarify:

The only way I can get the js file to load is when I put it in the head of the layout file (2columns-right) and use an absolute url.

How do I get javascript files to load when they are placed in the js folder of the skin folder? I cant get it to work through the page.xml and it could be that I am not calling it correctly.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top