Difference between revisions of "Adding a JavaScript Entry"
From unroole CMS wiki
m |
|||
Line 18: | Line 18: | ||
# Enter the name of the JavaScript entry for reference | # Enter the name of the JavaScript entry for reference | ||
# Add in your JavaScript compatible code. The layout editor provides a number of tags and classes for you to reference. For more information see [Layout Structure]. | # Add in your JavaScript compatible code. The layout editor provides a number of tags and classes for you to reference. For more information see [Layout Structure]. | ||
− | # Click | + | # Click 'Save' to finalize the creation of your stylesheet. |
'''Notes:''' | '''Notes:''' | ||
* ''Due to the nature of browser compatibility with certain css tags the system does not check for valid syntax upon JavaScript creation.'' | * ''Due to the nature of browser compatibility with certain css tags 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}} |
Revision as of 16:59, 4 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 compatible 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 stylesheet.
Notes:
- Due to the nature of browser compatibility with certain css tags 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.