Difference between revisions of "Adding a JavaScript Entry"
From unroole CMS wiki
m |
|||
Line 22: | Line 22: | ||
'''Notes:''' | '''Notes:''' | ||
− | * ''Due to the nature of browser compatibility with certain | + | * ''Due to the nature of browser compatibility with certain JavaScript code the system does not check for valid syntax upon JavaScript creation.'' |
* ''Any JavaScript entries added to a channel will become available immediately after creation. It is highly recommended to target specific html tags or attributes unique to page versions if this JavaScript entry is only application to a particular version of a [[page]].'' | * ''Any JavaScript entries added to a channel will become available immediately after creation. It is highly recommended to target specific html tags or attributes unique to page versions if this JavaScript entry is only application to a particular version of a [[page]].'' | ||
{{clear}} | {{clear}} |
Latest revision as of 08:31, 18 July 2012
For more information, see JavaScripts.
Adding a JavaScript entry to a channel is a good way to add dynamic functionality that may not be provided by a theme. For example adding printing or hover functionality that target specific widgets can be done by creating a JavaScript entry for a channel. Any javascript entries added to a channel are automatically appended to the header of a page in the order specified in the currently active [Theme]. To add a new javascript entry please follow these steps:
- Navigate to the JavaScript section under "Channel Content".
- Click the 'Create' button.
- Enter the name of the JavaScript entry for reference
- Add in your JavaScript code. The layout editor provides a number of tags and classes for you to reference. For more information see Layout Structure.
- Click 'Save' to finalize the creation of your javascript entry.
Notes:
- Due to the nature of browser compatibility with certain JavaScript code the system does not check for valid syntax upon JavaScript creation.
- Any JavaScript entries added to a channel will become available immediately after creation. It is highly recommended to target specific html tags or attributes unique to page versions if this JavaScript entry is only application to a particular version of a page.