Adding code to a page in NetCommunity:
Adding code to the page will only apply on that page. This can be handy if you need to affect something specific without affecting other pages on the site.
- Create an Unformatted Text Part.
- Paste the code into the part, and check the Advanced Options checkbox to add the code to either the location of the part within the <body>, end of the <body> (after jQuery is loaded) or <head> sections of the page.
- Save the Part, and insert the part on the desired page.
Adding code to the Template in NetCommunity:
Sometimes it is necessary to have code on multiple pages in the NetCommunity site. If these pages share a common template, the code can be added at the template level. This is handy if you need to update multiple pages at once on the site.
- Create an Unformatted Text Part
- Paste the code into the part, and check the Advanced Options checkbox to add the code to the <body> or <head> sections of the page.
- Go to Site Explorer > Pages and Templates, and select the template that you would like to add the script to.
- Insert the Unformatted Text Part into a content placeholder on the template.
Adding code to a NetCommunity Layout:
If multiple templates are in use, but pages are using the same layout, the code can be inserted into the HTML of the layout.
- Edit the layout, and select the View tab.
- Select HTML Code.
- The code can then be inserted into the HTML editor. Depending on the type of code that is being inserted, you can place the script in the code where appropriate (i.e. top or bottom).