JavaScripts work similar to CSS stylesheets, with a few key differences. If you add a file to the custom
folder, it must be of type "file". To add it to your registry through the web, go to portal_javascripts
and add it there. Again, you may need to enable debug mode to see your JavaScript changes. Once again, this is not the advisable way of adding JavaScripts, and you will typically do this on the filesystem instead.
To add a JavaScript to your filesystem product, add code like this to your profiles/jsregistry.xml
file:
<?xml version="1.0"?> <object name="portal_javascripts"> <javascript cacheable="True" compression="none" cookable="True" enabled="True" expression="" id="sifr.js" inline="False"/> </object>
You can either add this script file to your skins/plonetheme_mytheme_custom_templates
folder, or you can create a folder that specifically holds JavaScripts and modify the boilerplate as needed. The boilerplate...