Facebook Pixel Source Code Asset - OU Campus Self-Help at WKU | Western Kentucky University Skip to main content

Source Code Overview

Source Code Assets are used for entering source code or scripts such as JavaScript or PHP. They are created and edited with a mini Source Editor. Unlike Plain Text Assets, characters are not escaped. Most assets created using the Source Code Asset are not rendered when viewed in the WYSIWYG Editor. There is no preview for how these assets appear once rendered. Source Code Assets support Dependency Manager tags and linking. This type of asset is available across sites within an account unless Lock to Site is selected.


Example of Source Code Asset Configuration
Example of Source Code Asset Configuration


Creating a Source Code Asset

  1. Navigate to Content > Assets.

    Content Tab

  2. Click the New button.

    New Button

  3. Select Source Code from the menu. This displays the New Source Code Asset screen with three groupings of content: Asset Info, Access Settings, and Asset Content.
  4. The following items are available for configuring the asset.
    • Name: Define a friendly name that will help users identify it for use within the WYSIWYG.
    • Description: The description can also be helpful to a user when selecting an asset as it is shown in the Asset Browser (in the WYSIWYG Editor, for example) when hovering over the asset name.
    • Tags: Any tags associated with an asset during asset creation can be helpful to a user in selecting an asset either when using the WYSIWYG Editor or from the list view on the Assets screen as tags can help delimit the list. 
    • Lock to Site: Select the checkbox to disallow use of the asset outside of the site. In other words, by default, assets are available to all sites within an account. If the asset should only be available to the site in which it was created, then select this checkbox.

    Asset Info

    • Access Group: Assigns an access group to the asset. Everyone, the default, indicates that every user within the account can edit and manage the asset from the Access screen.
    • Readers: Assigns an access group specific to who can use the asset. Everyone, the default, indicates that every user within the account can insert the asset from the WYSIWYG.

      Access Settings Panel

    • Asset Content: The Asset Content field for a Source Code Asset is a mini–Source Editor and includes the following functionality:
      • Undo/redo
      • Find/replace with regex option
      • Go to line
      • Line wrap option
      • Ability to insert a file path by browsing or manually from either staging, production, or publish target
      • Syntax highlighting with 11 code syntax choices
      • Theme choice

  5. After configuring the items click Create.
  6. Once the asset has been created, Publish the asset.

Like pages, created and saved assets can be immediately published, scheduled to publish, or sent to user for approval. An unpublished asset can even be inserted onto pages; however, an asset does not render on the production server until it has been published. 


Need Assistance?

The WKU ITS Service Desk is here to help. Give us a call, chat with a representative online, use the Self-Help Knowledge Base and more.

Get Help

Some of the links on this page may require additional software to view.

 Last Modified 2/20/19