Code only
Used to add custom code to a page
How to use
For use by Administrators only.
- Optionally add code to the Code element, this is output in the main body of the page
- Optionally add CSS to the Customized CSS element, this is output in the page <head>,<style> tags are not required
- Optionally select a Script file from the Media Library, this is output at the end of the page before the closing </body> tag
- Optionally add JavaScript to the Scripts element, this is output at the end of the page before the closing </body> tag
- Optionally add Custom Head Code, this is output in the page <head>
Specific Use Cases
On the Seattle website there are specific sections where the Code only content type has been used:
Note: when used under Site Assets only the Code element is used
- Home » Site Assets » Common Header » Search Code - HTML for the Google Search Box which is pulled into the header of every page
- Home » Site Assets » Common Header - HTML code for website header
- Home » Site Assets » Code - Head - Add code to the <head> section of every page e.g., JavaScript for Google Site Search
- Home » Site Assets » Code - Body Start - Add code after the opening <body> tag on every page e.g., tracking or analytics code
- Home » Site Assets » Code - Body End - Add code before the closing </body> tag on every page e.g., tracking or analytics code
- Home » Search - HTML for the Google Site Search results page
Content Type Details
ID: 7258
Name: SU Website 2023 - Code only
Description: Template for adding code to a section
Minimum user level: Moderator
Content Type Elements Details
Name | Description | Size | Type | Required |
---|---|---|---|---|
Name | The Name element | 80 Characters | Plain Text | Yes |
Code | Add code | 99999 Characters | Plain Text | No |
Customized CSS | CSS that will be output in page header. `<style>` tags not required. | 99999 Characters | Plain Text | No |
Script file | Optional script file that loads before custom JavaScript below. Useful for loading libraries and frameworks. | N/A | Media | No |
Scripts | Script(s) that will be output in bottom of page. `<script>` tags required. | 99999 Characters | Plain Text | No |
Custom Head Code | Code that gets inserted into the `<head>` tag | 99999 Characters | Plain Text | No |
Documentation | Internal notes and information. Not published. | 99999 Characters | HTML | No |