This article contains an overview of the different stage handler settings for a Webserver stage handler:
The section "General" is available for every stage and therefore excluded from the screenshot. It contains fields for the Name and Trigger mechanism of the stage handler, as well as the "Scope", which determines which assets will be published. With the "Recursive" checkbox, you can ensure that assets from sub-nodes of the chosen "Scope" node will also be published.
In order for the stage handler configuration to be successful, the "backstage-webserver" product extension must be correctly installed and configured on your system.
You can find the installation instructions for the Webserver Connector in the Customer Knowledge Base.
In the "Transfer Details" section, you define important details for saving the synchronized assets to a structure on a web server.
Sync Reference ID: This required field is needed to uniquely identify the assets that should be synchronized inside the scope. Additionally, it determines the name of each synchronized asset's direct parent directory on the web server. It is primarily needed for synchronizing to a portals server and is only evaluated if you choose the Portals Directory Resolver, but you must not leave it empty.
Link field to "ID" metadata
CELUM advises that you link this field to the "ID" metadata field, which means that each synchronized Asset is saved to a directory named after its ID. Be sure to use the field input mode "Link to metadata" and choose the entry "ID" from the drop-down:
Download Format: Determines the format that synchronized assets will be converted to during upload to the web server.
Target Structure Scope: As opposed to the "Scope" field in the "General" section, which determines the assets that get published, this field determines the folder structure that the assets will be saved into on the webserver. All chosen nodes and their sub-nodes will be created as folders on the web server.
CELUM recommends that you always set the same value for the target structure scope as for the scope, in order to accurately recreate the CELUM Content node structure and its assets on the web server.
Behavior annotations
If you rename a node in the scope, the folder with the original name stays on the web server and a new folder with the new name is created additonally. The folder with the original name is emptied.
If the assets or nodes in the scope contain certain special characters in their names (e.g. characters from other characters sets, like Cyrillic, Arabic or Chinese), the files and folders may not be removed properly when you unpublish the stage handler.
File Name Resolver: Determines how the synchronized assets are named on the web server. There are various resolvers available of of the box:
AssetNameResolver: Published assets are named after their asset name in CELUM Content.
AssetNameWithIdResolver: Published assets are named in the pattern <asset name>_<asset ID>.
OriginalFileNameResolver: Published assets are named after their original file name.
PortalsFileNameResolver: Published assets are named with a generated UUID which is needed for a sync to a portals server.
This option is only available if you have a CELUM Portals Connector in version 6.1 or higher configured on your system.
Directory Resolver: Determines which folder structure is created on the web server. There are two resolvers available out of the box:
NodePathDirectoryResolver: In connection with the Target Structure Scope field, this resolver causes the node structure(s) specified in the Target Scope to be recreated on the web server. Be aware that nodes are not recreated on the web server, unless they contain full sub-nodes.
PortalsDirectoryResolver: This resolver works independently of the Target Structure Scope field and automatically saves each synchronized asset to a folder named after the value of the Sync Reference ID on the web server. It is primarily needed for a sync to a portals server.
This option is only available if you have a CELUM Portals Connector in version 6.1 or higher configured on your system.
Special Characters: Specify special characters that should be replaced in node and asset names in case they are not supported by the web server's operating system. The characters need no spaces or delimiters between them.
Alternative Characters: Specify a single character that will be used to replace the special characters.
If you do not specify any special characters or alternative characters, the synchronization of assets or nodes with unsupported characters in the name may fail or produce unexpected results on the web server.
Information about how you can implement custom resolvers is provided in the "Webserver Connector Developer How-To: Custom Resolver" chapter in the Customer Knowledge Base.
The field set "Connection Details" holds all fields you need to specify the connection to a web server you want to synchronize to.
With the Webserver Connector, you can synchronize assets to
a file system/HTTP server
or an FTP server.
In the field "Transfer mode" you can specify which of the two systems you want to sync to. The field "External URL" is needed for both transfer modes and needs to include the protocol. The other fields in the field set are dependent on the Transfer mode.
If you want to synchronize to your local file system, you need the following settings on your handler:
Choose File from the "Transfer mode" drop-down.
In the field "External URL"
you need to specify the URL to the sync directory along with the file:/// protocol. Inside the sync-directory, the
CELUM Content
folder structure from the Target Structure
Scope will be created.
Example for sync to local folder on your
CELUM Content
server: file:///<absolute/path/to/the/sync-directory>,
e.g. file:///C:/Webserver/sync/
In the field "File system path"
you need to specify the path to the sync-directory without
the protocol.
Example for sync to local folder:
<absolute/path/to/the/parent/sync-directory>,
e.g. C:\Webserver\sync\
Sync directory will be automatically created
You don't need to create the sync directory on the server manually. Just adding it to External URL and File system path will create it during synchronization if it doesn't exist yet.
The exact structure on the web server depends on your Scope and Target Structure Scope, as well as the resolvers you used.
'Write' permissions required
In order to be able to publish to a web server, make sure you have Write permissions on the sync directory, otherwise you won't be able to synchronize.
If you want to synchronize to an FTP or sFTP server, you need the following settings on your handler:
Choose FTP from the "Transfer Mode" drop-down.
In the field "External URL"
you need to specify the URL to the sync directory of your web
server with protocol (http://, ftp:// or sftp://).
Example 1: http://<server
URL>/path/to/the/sync/directory/
Example 2: ftp://<server
URL>/path/to/the/sync/directory/
Example 3: sftp://<server
URL>/path/to/the/sync/directory/
In the field "FTP mode", you need to specify either active or passive mode.
Active FTP mode is recommended for Secure Transfer.
In the field "Hostname"
you need to specify the URL to the sync directory of your web
server without protocol.
Example: <server
URL>/path/to/the/sync/directory/
Enter your FTP server's user name and password in the respective fields.
If you are synching to an sFTP server, check the "Secure Transfer" checkbox.
Sync directory will be automatically created
You don't need to create the sync directory on the server manually. Just adding it to External URL and Hostname will create it during synchronization if it doesn't exist yet.
The exact structure on the web server depends on your Scope and Target Structure Scope, as well as the resolvers you used.
'Write' permissions required
In order to be able to publish to a web server, make sure you have Write permissions on the sync directory, otherwise you won't be able to synchronize.