Studio Configuration

Role Mappings

Role mappings configuration file defines mapping between group that user belongs to and studio authoring role.

Sample

/cstudio/config/sites/SITENAME/role-mappings.xml
<?xml version="1.0" encoding="UTF-8"?>
<role-mappings>
    <groups>
        <group name="crafter-admin">
            <role>admin</role>
        </group>
        <group name="crafter-author">
            <role>author</role>
        </group>

        <group name="crafter_SITENAME_admin">
            <role>admin</role>
        </group>
        <group name="crafter_SITENAME_author">
            <role>author</role>
        </group>
        <group name="crafter_SITENAME_viewer">
            <role>viewer</role>
        </group>
    </groups>
</role-mappings>

Description

/role-mappings/groups/group@name
Name of the user group
/role-mappings/groups/role
Name of authoring role that group will map to

Permission Mappings

Sample

/cstudio/config/sites/SITENAME/permission-mappings.xml
<?xml version="1.0" encoding="UTF-8"?>
<permissions>
    <site id="SITENAME">
        <role name="admin">
            <rule regex="/.*">
                <allowed-permissions>
                    <permission>Read</permission>
                    <permission>Write</permission>
                    <permission>Delete</permission>
                    <permission>Create Folder</permission>
                    <permission>Publish</permission>
                    <permission>Create Content</permission>
                    <permission>Change Content Type</permission>
                </allowed-permissions>
            </rule>
            <rule regex="~DASHBOARD~">
                <allowed-permissions>
                    <permission>Read</permission>
                    <permission>Write</permission>
                    <permission>Delete</permission>
                    <permission>Create Folder</permission>
                    <permission>Publish</permission>
                    <permission>Create Content</permission>
                    <permission>Change Content Type</permission>
                </allowed-permissions>
            </rule>
        </role>
        <role name="author">
            <rule regex="/.*">
                <allowed-permissions>
                    <permission>Read</permission>
                    <permission>Write</permission>
                </allowed-permissions>
            </rule>
            <rule regex="~DASHBOARD~">
                <allowed-permissions>
                    <permission>Read</permission>
                    <permission>Write</permission>
                </allowed-permissions>
            </rule>
        </role>
        <role name="*">
            <rule regex="/.*">
                <allowed-permissions>
                    <permission>Read</permission>
                </allowed-permissions>
            </rule>
            <rule regex="~DASHBOARD~">
                <allowed-permissions>
                    <permission>Read</permission>
                </allowed-permissions>
            </rule>
        </role>
    </site>
</permissions>

Description

List of available permissions

Permission Description
Read User is permitted to read content
Write User is permitted to edit content
Delete Users is permitted to delete content
Request Delete User is permitted to submit content for deletion (request delete from approver)
Create Folder User is permitted to create new folder
Publish User is permitted to approve submitted content for publishing or publish content
Create Content User is permitted to create new content
Change Content Type User is permitted to change content type
/permissions/site@id
Site id
/permissions/site/role@name
Role name
/permissions/site/role/rule@regex
Regular expression to filter paths where permission is applied Value regex=”~DASHBOARD~” is special regular expression applied for content displayed in dashboard widgets only
/permissions/site/role/rule/allowed-permissions/permission
Allowed permission for role and rule (possible values give in the table above)

Deployment Endpoints

Sample

/cstudio/config/sites/SITENAME/deployment/endpoints-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<config>
    <endpoint>
        <name>sample</name>
        <type>craftercms-deployer</type>
        <server-url>http://localhost:9191/publish</server-url>
        <status-url>http://localhost:9191/api/1/monitoring/status</status-url>
        <version-url>http://localhost:9191/api/1/version</version-url>
        <bucket-size>10</bucket-size>
        <password>admin</password>
        <target>sample</target>
        <send-metadata>false</send-metadata>
    </endpoint>
</config>

Description

/config/endpoint/name
Endpoint name
/config/endpoint/type
Type of deployer (the only possible value is craftercms-deployer)
/config/endpoint/server-url
Url to publish content
/config/endpoint/status-url
Url to check deployers’ checking status
/config/endpoint/version-url
Url to check target’s version for deployment sync
/config/endpoint/bucket-size
Number of files to be sent per one publishing http request
/config/endpoint/password
Password for target
/config/endpoint/target
Target name
/config/endpoint/send-metadata
Send metadata with file content

Deployment endpoints configuration is stored in configuration space of the site (relative path: deployment/endpoints-config.xml). Configuration file should contain configuration for all endpoints used to deploy content to different publishing environments. Each endpoint configuration is separated by <endpoint> elements in configuration file. Endpoint is identified in the system by its name (/config/endpoint/name). Endpoint name is used in publishing environment configuration to reference endpoints which belong to a publishing environment (channel). Type of deployer is an inessential value since only possible value is craftercms-deployer. This endpoint property is reserved for future use. Server URL is URL of the deployment agent’s service that is used for publishing content. Authoring will publish content by sending HTTP request containing content files to this URL. Status URL is URL of the deployment agent’s service that is used to check agent’s status (if it is available). Authoring is using this servis to determine if deployment agent is accessible before publishing content. Version URL is URL of the deployment agent’s service that is used to determine which version of content is currently available (deployed) on the deployment agent’s target. Version is a timestamp of the last deployment that was performed on selected endpoint. It is used to synchronize content deployed on endpoint with publishing queue. Meaning of version value is how far behind the deployment queue is selected endpoint. Bucket size defines maximum number of files that can be sent within one HTTP request when publishing content. If deployment package has more files than the this value, package is divided and sent using required number of HTTP requests to deploy all content files. Deployment is successful only of all HTTP requests are successful. Password represents password value that is configured for deployment agent’s target. It needs to be sent as parameter with HTTP request when publishing content in order to “authenticate” service call. Target name represents name of the deployment agent’s target where content files will be deployed. This value needs to match name of the target as it is defined in deployment agent’s target configuration. Send metadata is a flag that defines whether file metadata should be sent together with content file. When value set to true, it will send file metadata with content file. Currently it is not in use (legacy functionality).

Environment Overrides

Sample

/cstudio/config/sites/SITENAME/environment-overrides/ENVIRONMENT/environment-config.xml
<environment-config>
        <preview-server-url>http://127.0.0.1:8080</preview-server-url>
        <authoring-server-url>http://127.0.0.1:8080/studio</authoring-server-url>
        <form-server-url>http://127.0.0.1:8080/form-server</form-server-url>
        <live-server-url>http://SITENAME</live-server-url>
    <publishing-channels>
        <channel-group>
            <label>Production</label>
            <channels>
                <channel>sample</channel>
            </channels>
            <live-environment>true</live-environment>
        </channel-group>
        <!--
        <channel-group>
            <label>Test</label>
            <channels>
                <channel>sample</channel>
            </channels>
            <live-environment>false</live-environment>
        </channel-group>
        -->
    </publishing-channels>
        <cookie-domain>127.0.0.1</cookie-domain>
        <open-site-dropdown>false</open-site-dropdown>
</environment-config>

Description

/environment-config/preview-server-url
Preview url /environment-config/authoring-server-url Authoring url /environment-config/form-server-url Form server url (deprecated) /environment-config/live-server-url Live server url
/environment-config/publishing-channels
Defines publishing channels
/environment-config/publishing-channels/channel-group
Defines one publishing channel
/environment-config/publishing-channels/channel-group/label
Publishing channel name
/environment-config/publishing-channels/channel-group/channels
Defines deployment endpoints belonging to this publishing channel
/environment-config/publishing-channels/channel-group/channels/channel
Deployment endpoint name
/environment-config/publishing-channels/channel-group/live-environment
True if this channel is live environment
/environment-config/cookie-domain
Environment cookie domain
/environment-config/open-site-dropdown
True if site dropdown is opened by default

Admin Console Tools

Sample

/cstudio/config/sites/SITENAME/administration/tools.xml
<config>
    <tools>
        <tool>
            <name>content-types</name>
            <label>Content Types</label>
            <controls>
                <control>input</control>
                <control>textarea</control>
                <control>rte</control>
                <control>dropdown</control>
                <control>date-time</control>
                <control>checkbox</control>
                <control>checkbox-group</control>
                <control>node-selector</control>
                <control>image-picker</control>
                <control>video-picker</control>
                <control>label</control>
                <control>page-nav-order</control>
                <control>file-name</control>
                <control>auto-filename</control>
            </controls>
            <datasources>
                <datasource>child-content</datasource>
                <datasource>img-desktop-upload</datasource>
                <datasource>img-repository-upload</datasource>
                <datasource>img-flickr-upload</datasource>
                <datasource>file-desktop-upload</datasource>
                <datasource>file-browse-repo</datasource>
                <datasource>flash-desktop-upload</datasource>
                <datasource>video-desktop-upload</datasource>
                <datasource>video-browse-repo</datasource>
                <datasource>key-value-list</datasource>
                <datasource>configured-list</datasource>
            </datasources>
            <objectTypes>
                <type>
                    <label>Page</label>
                    <name>page</name>
                    <properties>
                        <property>
                            <name>display-template</name>
                            <label>Display Template</label>
                            <value></value>
                            <type>template</type>
                        </property>
                        <property>
                            <name>merge-strategy</name>
                            <label>Merge Strategy</label>
                            <value>inherit-levels</value>
                            <type>string</type>
                        </property>
                    </properties>
                </type>
                <type>
                    <label>Component</label>
                    <name>component</name>
                    <properties>
                        <property>
                            <name>display-template</name>
                            <label>Display Template</label>
                            <value></value>
                            <type>template</type>
                        </property>
                        <property>
                            <name>merge-strategy</name>
                            <label>Merge Strategy</label>
                            <value>inherit-levels</value>
                            <type>string</type>
                        </property>
                    </properties>
                </type>

            </objectTypes>
        </tool>
        <tool><name>admin-configurations</name><label>Configuration</label></tool>
        <tool><name>bulkoperations</name><label>Bulk Operations</label></tool>
        <tool><name>workflow-jobs</name><label>Workflow Jobs</label></tool>
        <tool><name>workflow-states</name><label>Workflow States</label></tool>
        <tool><name>logging</name><label>Logging Levels</label></tool>
        <tool><name>log-view</name><label>Log Console</label></tool>
    </tools>
</config>

Description

/config/tools/tool
Admin console tool definition
/config/tools/tool/name
Tool name (javascript module name)
/config/tools/tool/label
Display label in admin console navigation menu

Content Type Specific tool configuration

/config/tools/tool/controls
List of available content type form controls
/config/tools/tool/controls/control
Control name (javascript control module name)
/config/tools/tool/datasources
List of available datasources for content type form controls
/config/tools/tool/datasources/datasource
Datasource name (javascript datasource module name)
/config/tools/tool/objectTypes
List of available object types
/config/tools/tool/objectTypes/type
Type configuration (Page or Component) - name, label, properties

List of available tools

Tool Description
admin-configurations  
bulkoperations  
comment-moderation  
content-types  
deployment-tools  
find-replace  
log-view  
logging  
site-profiles  
socialmention  
taxonomies  
workflow-jobs  
workflow-states  

List of available content type form controls

Control Description
auto-filename  
checkbox-group  
checkbox  
date-time  
disabled  
dropdown  
file-name  
flash-picker  
forcehttps  
image-picker  
input  
internal-name  
label  
link-input  
link-textarea  
linked-dropdown  
node-selector  
page-nav-order  
rte  
textarea  
uuid  
video-picker  

List of available datasources

Datasource Description
child-content  
configured-list  
file-browse-repo  
file-desktop-upload  
flash-desktop-upload  
hubspot-forms  
img-desktop-upload  
img-flickr-upload  
img-repository-upload  
key-value-list  
salesforce-campaigns  
site-component  
tree-content  
video-browse-repo  
video-desktop-upload  

Configure Simple Workflow Notifications and Dialog Messages

This document assumes version 2 of the notification service has been enabled. A system administrator can assist in configuring the notification service by following the following documentation Simple Workflow Notifications

Basics

All configuration for the notification system is done by a site admin (on a per site basis) in the following configuration file:

Where

{REPOSITORY_ROOT}/cstudio/config/sites/SITEID/workflow-messaging-config.xml
<notificationConfig>
   ...
</notificationConfig>

Templates

Templates are managed in the config file mentioned above. The template time is Freemarker (also known as FTL) Variables are referenced in the template like ${VARIABLE} or as part of a Freemarker statement like <#list files as file>…</#list> Dates can be formatted like so: scheduleDate?string[“MMMMM dd, yyyy ‘at’ hh:mm a”]}

A full guide to FTL can be found here: http://freemarker.org/

Template Variables

Common Variables

Variable Name Description
date Date for submission
files Collection of file objects in submission. Usually iterated over <#list files as file>…</#list>
file.name File name including full repository path
file.internalName File internal CMS label
submitter Content submitter object, has sub propeties
submitter.firstName First name
submitter.lastName Last Name
submitter.username Authoring User Name / ID
submissionComments String containing submission comments
scheduleDate Date content is scheduled for
siteName ID of the site
liveUrl Live Server URL base
authoringUrl Authoring Server URL base

Deployment Error Notice

Variable Name Description
deploymentError Error message on deployment. Currently must be addressed as ${deploymentError.toString()}

Configure Who Gets Notifications

{REPOSITORY_ROOT}/cstudio/config/sites/SITEID/workflow-messaging-config.xml
    <notificationConfig>
        <lang name="en">
            <deploymentFailureNotification>
                <email>EMAIL ADDRESS TO NOTIFY ON FAILURE</email>
            </deploymentFailureNotification>
            <approverEmails>
                <email>EMAIL ADDRESS TO NOTIFY SUBMISSION</email>
                    <email>EMAIL ADDRESS TO NOTIFY SUBMISSION</email>
            </approverEmails>

            ...
         </lang>
    </notificationConfig>

Configure Studio Worflow Dialog Messages

{REPOSITORY_ROOT}/cstudio/config/sites/SITEID/workflow-messaging-config.xml
    <notificationConfig>
     <lang name="en">
            ...

            <generalMessages>
                <content key="scheduling-policy"><![CDATA[The Marketing Team processes all Go Live requests each business day, between 4 and 6:00pmE, unless a specific date/time is requested.<br/><br/>All requests received after 4:00pmE may not be processed until the next business day.<br/><br/>If you have any questions about this policy or need a Go Live request processed immediately, please email the Web Marketing Operations Team.]]>
                </content>
            </generalMessages>
            <cannedMessages>
                <content  title="Not Approved" key="NotApproved"><![CDATA[Please make the following revisions and resubmit.]]></content>
                <content  title="Incorrect Branding" key="IncorrectBranding"><![CDATA[This content uses incorrect or outdated terms, images, and/or colors. Please correct and re-submit.]]></content>
                <content  title="Typos" key="Typos"><![CDATA[This content has multiple misspellings and/or grammatical errors. Please correct and re-submit.]]></content>
                <content  title="Incorrect Branding" key="IB"><![CDATA[This content uses incorrect or outdated terms, images, and/or colors. Please correct and re-submit.]]></content>
                <content  title="Broken Links" key="BrokenLinks"><![CDATA[This content has non-working links that may be due to incomplete and/or misspelled URLs.  Any links directing users to websites without the Acme.com primary navigation, or directing users to a document must open in a new browser window. Please correct and re-submit.]]></content>
                <content  title="Needs Section Owner's Approval" key="NSOA"><![CDATA[This content needs the approval of its section's owner to insure there is no negative impact on other pages/areas of section, etc. Once you have their approval please email the Web Marketing Operations Team and re-submit this Go Live request.]]></content>
            </cannedMessages>
            <completeMessages>
                <content  key="submitToGoLive"><![CDATA[An email notification has been sent to the Web Marketing Operations Team. Your content will be reviewed and (if approved) pushed live between 4:00pmE and 6:00pmE of the business day that the request was received. If this request is sent after business hours, it will be reviewed and (if approved) pushed live as soon as possible, the next business day.<br/><br/>If you need to make further revisions to this item, please re-submit this Go Live request after making them.<br/><br/>If this request needs immediate attention, please email the Web Marketing Operations team.]]></content>
                <content key="delete">
                    Item(s) has been pushed for delete. It will be deleted shortly.
                </content>
                <content key="go-live">Item(s) has been pushed live. It will be visible on the live site shortly.</content>
                <content key="schedule-to-go-live">The scheduled item(s) will go live on: ${date}.&lt;br/&gt;&lt;br/&gt;</content>
                <content key="reject">Rejection has been sent. Item(s) have NOT been pushed live and have returned to draft state.</content>
                <content key="delete">Item(s) has been pushed for delete. It will be deleted shortly.</content>
                <content key="schedule-to-go-live">Item(s) have been scheduled to go live.</content>
            </completeMessages>

            ...
      </lang>
    </notificationConfig>

Configure Templates

{REPOSITORY_ROOT}/cstudio/config/sites/SITEID/workflow-messaging-config.xml
<notificationConfig>
    <lang name="en">
        ...
        <emailTemplates>
            <emailTemplate key="deploymentError">
                <body><![CDATA[
                    <html>
                        <body style=" font-size: 11pt;font-family: Calibri, Candara, Segoe, 'Segoe UI', Optima, Arial, sans-serif; margin-top:0px">
                            <p style="margin-top:0px">
                                The following content was unable to deploy:
                            </p>
                            <ul  style="color:#0000EE;">
                                <#list files as file>
                                    <li>${file.internalName!file.name}</li>
                                </#list>
                            </ul>
                            Error:<br/>
                            ${deploymentError.toString()}
                            <br/>
                        </body>
                     </html>
                ]]></body>
                <subject>Deployment error on site ${siteName}</subject>
            </emailTemplate>
            <emailTemplate key="contentApproval">
                <body><![CDATA[
                    <#setting time_zone='EST'>
                         <html>
                            <body style=" font-size: 11pt;font-family: Calibri, Candara, Segoe, 'Segoe UI', Optima, Arial, sans-serif; margin-top:0px">
                            <p style="margin-top:0px">
                                <#if scheduleDate??>
                                    The following content has been scheduled for publishing on ${scheduleDate?string["MMMMM dd, yyyy 'at' hh:mm a"]} Eastern Time.
                                <#else>
                                    The following content has been reviewed and approved.
                                </#if>
                            </p>
                            <ul  style="color:#0000EE;">
                                <#list files as file>
                                    <#if file.page>
                                        <li <#if file?has_next>style="margin-bottom: 0px"</#if>>
                                            <a href="${liveUrl}/${file.browserUri!""}">
                                                ${file.internalName!file.name}
                                            </a>
                                        </li>
                                    </#if>
                                </#list>
                            </ul>
                            <#if scheduleDate??>
                                <p>You will receive a confirmation email when your content is published.</p>
                                </#if>
                            </body>
                         </html>
                ]]></body>
                <subject><![CDATA[<#if scheduleDate??>WCM: Content Scheduled<#else>WCM: Content Approved</#if>]]></subject>
            </emailTemplate>
            <emailTemplate key="submitToApproval">
                <body><![CDATA[
                    <#setting time_zone='EST'>
                    <html>
                        <body style=" font-size: 11pt;font-family: Calibri, Candara, Segoe, 'Segoe UI', Optima, Arial, sans-serif; margin-top:0px">
                            <p style="margin-top:0px">
                                <span style="text-transform: capitalize;">${submitter.firstName!submitter.username} ${submitter.lastName}</span> has submitted items for your review.
                            </p>
                            <ul  style="color:#0000EE;">
                                <#list files as file>
                                    <#if file.page>
                                        <li <#if file?has_next>style="margin-bottom: 0px"</#if>>
                                            <a href="${authoringUrl}/preview/#/?page=${file.browserUri!""}&site=SITENAME">
                                                ${file.internalName!file.name}
                                            </a>
                                        </li>
                                    </#if>
                                </#list>
                            </ul>
                            <br/><br/>
                            <#if submissionComments?has_content>
                                Comments:&nbsp;${submissionComments!""}
                                <br/><br/>
                            </#if>
                            <a href="${authoringUrl}/site-dashboard">Click Here to Review Workflow</a>
                            <br/>
                        </body>
                    </html>
                ]]></body>
                <subject>WCM Content Review</subject>
            </emailTemplate>
            <emailTemplate key="contentRejected">
                <body><![CDATA[
                    <#setting time_zone='EST'>
                    <html>
                        <body style=" font-size: 11pt;font-family: Calibri, Candara, Segoe, 'Segoe UI', Optima, Arial, sans-serif; margin-top:0px">
                            <p style="margin-top:0px">
                                The following content has been reviewed and requires some revision before it can be approved.
                            </p>
                            <ul  style="color:#0000EE;">
                                <#list files as file>
                                    <#if file.page>
                                        <li <#if file?has_next>style="margin-bottom: 0px"</#if>>
                                            <a href="${authoringUrl}/preview/#/?page=${file.browserUri!""}&site=SITENAME">
                                                ${file.internalName!file.name}
                                            </a>
                                        </li>
                                    </#if>
                                </#list>
                            </ul>
                            Reason:&nbsp;${rejectionReason!""}
                            <br/>
                        </body>
                    </html>
                ]]></body>
                <subject>WCM Content Requires Revision</subject>
            </emailTemplate>
        </emailTemplates>
    </lang>
</notificationConfig>