Source Code Overview
Example of Source Code Asset Configuration
Creating a Source Code Asset
- Navigate to Content > Assets.
- Click the New button.
- 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.
- 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.
- 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.
- Asset Content: The Asset Content field for a Source Code Asset is a mini–Source Editor and includes the following functionality:
- 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
- After configuring the items click Create.
- 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.