Skip to content
PDF

The Content Script Volume

The Content Script Volume is a Content Server volume automatically created upon module installation.

The volume is used to store objects for various purposes. Among others, in the Content Script volume we may find:

  • System Objects: Objects necessary for the correct execution of different Module Suite components. These objects should not require modification in normal cases.

  • Configuration Objects: Objects used to configure specific functionalities

  • standard UI customization

  • event callback configuration
  • custom column data sources

  • Template Objects: Various sorts of objects to be used as templates, such as:

  • Content Script code snippets

  • Beautiful WebForms form templates
  • Beautiful WebForms form components
  • HTML view templates
  • Service Scripts: Scripts executed as service endpoints

  • Content Script backing REST services

Whenever possible, a convention-over-configuration approach is adopted in the Content Script Volume: simply placing a specific object in a specific position will be enough to alter in some way the behavior of some functionalities.

For this reason, a set of predefined containers is available in the volume, each one meant for a specific purpose. Here after is a view of the Content Server Volume.

The following sections will explain the purpose of each of the Containers.

How should I organize my volume ?

Even though the Content Script Volume has a predefined container structure, it is not unusual to have custom user data to be stored in the volume. Users are encouraged to use the volume to store custom templates and configurations, for example.

CSSystem

The CSSystem container is dedicated to Module Suite system components. The contents in this location should not require editing except for very specific reasons.

CSFormTemplates

This container is dedicated to HTML templates associated to Beautiful WebForms Views.

It will be covered in detail in the sections dedicated to Beautiful WebForms.

CSHTMLTemplates

The CSHTMLTemplates is a container dedicated to general-purpose HTML templates that could be necessary throughout Content Script applications.

As previously seen, Content Script can be used to create various types of output, including web pages and document. Additionally, a few services (such as the mail service) can use templates to perform their job.

It is usually discouraged to place HTML templating code directly within Scripts: the suggested approach is to separate the presentation templates from the underlying business logic, and to store it somewhere else on Content Server, where it can be reused across applications.

The CSHTMLTemplates container is available for developers as a common storage for templates necessary in their applications.

CSFormSnippets

The CSFormSnippets container is dedicated to the libraries of components that are available to build Beautiful WebForms views.

It will be covered in detail in the sections dedicated to Beautiful WebForms.

CSScriptSnippets

The CSScriptSnippets container features a two-level structure identical to the one described for the CSFormSnippets container, except that the objects stored here are not form components but Code Snippets to be used to simplify the creation of new scripts in the Content Script Editor.

As for the Form Snippets, new families and components added in this container will automatically be available in the Code Snippet library of the Content Script Editor.