Content files can be HTML, XML, images, Flash files or any other binary content that may be required to be served up to support a rule set. The content files live within a content path that must map to the content path of the application being protected. You can add arbitrary sub-directories below the initial content path, but the first one MUST match the application name. Alternatively, there is the Use server context path option in the configuration to use the Optional Context Path as defined for the server definition.
Content files can only be created within a repository. They cannot be created at root level.
In the configuration, you can nominate a specific rule set to be used for content only. This rule set will receive a copy of the served up content in a CONTENT variable, where CONTENT is the variable name, along with the URI variable containing the path and name of the item being served up.
Using the content rule set, you can modify the CONTENT variable with dynamic content before it is transmitted to the client.
The console contains a basic editor for managing most non-image content files. To edit a given content file, simply select it and click the Update button.
The editor will appear as shown:
You can use this editor to make changes to the file, before saving it and deploying it to the target server. The editor is fully functional with the most common keyboard short-cuts (such as Ctrl-F to Find and Ctrl-H to Find and Replace). Tab and Shift-Tab are also supported for indents and tag elements can be collapsed to improve code visibility. The editor has syntax highlighting and checking for most common file types.
Previewing Content Files
Editing Content Files
Deploying Content Files
The console has a file previewer for most common web-based content (HTML, images and so on). To preview a file, select it and click the Preview button.
Unlike data files, content files cannot be deployed singularly. This is because content files often have interdependencies. To avoid a conflict, the console will always deploy the entire content file structure wrapped up in a single file. You can do this on demand, or it will happen automatically when a configuration is deployed.
As part of the deployment, any JavaScript file with the following setting ticked will result in an automatic minimization and a map file being generated on the deployed target:
This allows you to work with full source JavaScript in development and minimized source in production that is still easy to debug.