cancel
Showing results for 
Search instead for 
Did you mean: 

Filepath for referencing css and javascript files

jamesburgess_20
Champ in-the-making
Champ in-the-making
Hi,  I'm working on an alfresco web script.  So far, to reference my css and javascript files I placed them in my alfresco tomcat folder C:\Alfresco\alfresco\tomcat\webapps\alfresco.  Then, I referenced them with a filepath like:  <script src="../../alloy-1.0.1/build/aui/aui.js" type="text/javascript"></script>.  I would like to change this so that the javascript and css files are in the same directory as my webscript and the code references them from there, so that I can do something like: <script src="lib/alloy-1.0.1/build/aui/aui.js" type="text/javascript"></script>.

Thanks for any help.
1 REPLY 1

sujaypillai
Confirmed Champ
Confirmed Champ
Hello James,

If you look into Alfresco's webscript implementation they bundle all their css + js under - webapps\share\components\<webscriptname> which is one of the best practices. I recommend you follow the same procedure. Now that if you are customizing then you should place it under - source\web\extras\components in your folder structure for development.

For more detail please refer http://addons.alfresco.com/ for getting a better understanding of directory structure to be used for development.