There are different places to put code depending on how you want it to work, or where you want it to work... or what format the code comes in.
Where to manage your custom javascript... (For raw javascript in javascript format, not in HTML include format, EG function blah(a,b){a,b} )
- login to our CMS
- Go to the design settings, scroll down to CUSTOM TEMPLATE EDITOR. If your template isnt set up as a custom template a notice in red text will be displayed at the top of the page.
- Find the Javascript (scripts.js) on the page located below templates A-F
- This will open an HTML window, paste the relevant script there and save. This script file will then be added to the template in the HEAD section of the HTML.
If you want to link to an external Javascript/JQuery library file (eg <SCRIPT SRC=""></SCRIPT> <LINK SRC=""></LINK>)
- Login to our CMS
- hover over files tab
- Click Javascript - meta includes
- Paste your <link> or <script src=> library code as required.
- If you need a widget to appear in a specific location on your page, follow the next instruction
If you want to insert widget code into your page, eg <SCRIPT>document.write(doSomething(1,10));</script>
- Login to our CMS
- FInd the preferred place to put the widget code, eg in a template, or in a specific page. Edit that template or page, so that you see our standard WYSIWYG editor with the word like toolbar.
- Use the INSERT... HTML/Script option in the toolbar to insert your javascript.
TIPS:
- Including 3rd party javascript can slow down your page, use it sparingly.
- It's best to include your javascript library code in the Meta Area, and your use of that code, in the designated area. Some code for pull out side widgets don't need to be inserted anywhere else except in the meta area.
- We already use the latest version of JQuery, so don't "double include it". Please strip out JQuery from your script pasting.
For more information on custom templates see the Design Templates Advanced section.