Difference between revisions of "Adding a JavaScript Entry"

From unroole CMS wiki
Jump to: navigation, search
Line 17: Line 17:
 
# Click the 'Create' button.
 
# Click the 'Create' button.
 
# 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 [http://en.wikipedia.org/wiki/JavaScript 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.
 
# Click 'Save' to finalize the creation of your javascript entry.
  

Revision as of 08:31, 18 July 2012


Unroole Site Builder Admin Panel - Javascript new.png

Creating a new simple JavaScript alert box on page load.

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:

  1. Navigate to the JavaScript section under "Channel Content".
  2. Click the 'Create' button.
  3. Enter the name of the JavaScript entry for reference
  4. 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.
  5. Click 'Save' to finalize the creation of your javascript entry.

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.