| | | | | |
How do I add custom Javascript/HTML/CSS code to my web site?
You can add your own HTML or Javascript/CSS code to your site's pages. This is useful for having more control over the display or for embedding specific tools from other web sites e.g.Google Analytics .
You can add custom code in the following ways:
Editing the Source code of a specific page
You can edit the HTML code or add Javascript/CSS to a specific pages as follows:
- Select the article in the Web Office that you wish to edit the HTML for or add Javascript code to.
- Within the document editor select the Source button; the HTML source code of the article will now be displayed.
- Add the required Javascript/HTML code.
- Click the Source button again to return to the article. You could then preview it before selecting Save to commit your changes.
Adding code to several pages
If you wish to add HTML or Javascript/CSS code to several pages on your web site you can do this through adding an article to a layout as follows:
- First create a layout that will work for all the pages you want to add the source code to. For more details on creating layouts see the Themes & Layouts guide.
- Add an article component to your layout.
- Select the
icon to open the article component's settings.
- Within the article component settings you can add your HTML or Javascript code to your layout in the following ways:
HTML (Advanced) - Selecting the HTML (advanced) option (as shown below will enable you to paste the code directly into your layout.
A specific article - If you add your code to the source of an an article (as described earlier) you can then select a specific article within the article component (as shown below). This method is advantageous if you wish to add your source code to several articles. By selecting the article containing the source in all the layouts will mean any alterations to the code can then be made in one place (the article's source) instead of editing each layout.

|
Justin Ruffell-Ward - Insight Support, 21/04/2010 |
|
|
|
|