Info: Performing the steps described in this article requires direct server access. Depending upon how your system is hosted and the level of access you have to that system, coordination may be required with your Partner or WoodWing Support team. For a full overview of the steps that need to be done by WoodWing and how to request them, see WoodWing Cloud - Change management.
When Studio Server is integrated with Assets Server it is important that metadata information is shared between the two systems so that information about how and where files are used in Studio Server can be verified and searched on.
For this purpose, various metadata fields are mapped, thereby making it possible for metadata changes in Assets Server to appear in Studio Server and the other way round.
An overview of the standard fields that are mapped are described in Metadata mapping between Studio Server and Assets Server.
However, you could also have created custom fields that need to be mapped or perhaps you want to make changes to the mapping of the standard fields.
This article explains how this is done.
A distinction is made between the standard metadata fields of Studio Server and custom metadata fields of Studio Server.
Note: We do not recommend to make changes to the mapping of standard fields but advise to create custom fields instead and to configure the mapping between that custom field and another field.
Standard metadata fields
Step 1. Open the <Studio Server location>/config/config_overrule.php file and verify if the following function exists. If it does not exist, add it. When done, leave the file open.
function Elvis_Config_GetAdditionalFieldHandlers()
{
// Field handler parameters: Assets Server fieldname, multivalue field, Assets Server data type, Studio Server fieldname
$cfgFieldHandlers = array();
// Paste the lines here ...
return $cfgFieldHandlers;
}
Step 2. Open the <Studio Server location>/config/config_elvis.php file and look up the following code fragment under ADVANCED config.
....
if( !function_exists( 'Elvis_Config_GetFieldHandlers' ) ) {
function Elvis_Config_GetFieldHandlers()
{
// Field handler parameters: Assets Server fieldname, multivalue field, Assets Server data type, Studio Server fieldname
$cfgFieldHandlers = array();
// Read Write Handlers
$cfgFieldHandlers['Comment'] = new Elvis_FieldHandlers_ReadWrite( "versionDescription", false, "text", "Comment" );
$cfgFieldHandlers['Rating'] = new Elvis_FieldHandlers_ReadWrite( "rating", false, "number", "Rating" );
$cfgFieldHandlers['Copyright'] = new Elvis_FieldHandlers_ReadWrite( "copyright", false, "text", "Copyright" );
$cfgFieldHandlers['CopyrightURL'] = new Elvis_FieldHandlers_ReadWrite( "licensorWebsite", false, "text", "CopyrightURL" );
$cfgFieldHandlers['Author'] = new Elvis_FieldHandlers_ReadWrite( "creatorName", false, "text", "Author" );
$cfgFieldHandlers['Credit'] = new Elvis_FieldHandlers_ReadWrite( "credit", false, "text", "Credit" );
$cfgFieldHandlers['Source'] = new Elvis_FieldHandlers_ReadWrite( "source", false, "text", "Source" );
$cfgFieldHandlers['Description'] = new Elvis_FieldHandlers_ReadWrite( "description", false, "text", "Description" );
$cfgFieldHandlers['DescriptionAuthor'] = new Elvis_FieldHandlers_ReadWrite( "captionWriter", false, "text", "DescriptionAuthor" );
// Read only Handlers
$cfgFieldHandlers['AspectRatio'] = new Elvis_FieldHandlers_ReadOnly( "aspectRatio", false, "decimal", "AspectRatio" );
$cfgFieldHandlers['Channels'] = new Elvis_FieldHandlers_ReadOnly( "audioChannels", false, "text", "Channels" );
$cfgFieldHandlers['ColorSpace'] = new Elvis_FieldHandlers_ReadOnly( "colorSpace", false, "text", "ColorSpace" );
$cfgFieldHandlers['Dpi'] = new Elvis_FieldHandlers_Resolution( "resolutionX", false, "number", "Dpi" );
$cfgFieldHandlers['Encoding'] = new Elvis_FieldHandlers_ReadOnly( "videoCodec", false, "text", "Encoding" );
$cfgFieldHandlers['Width'] = new Elvis_FieldHandlers_ReadOnly( "width", false, "number", "Width" );
$cfgFieldHandlers['Height'] = new Elvis_FieldHandlers_ReadOnly( "height", false, "number", "Height" );
$cfgFieldHandlers['Orientation'] = new Elvis_FieldHandlers_ReadOnly( "orientation", false, "number", "Orientation" );
$cfgFieldHandlers['LengthChars'] = new Elvis_FieldHandlers_ReadOnly( "numberOfCharacters", false, "number", "LengthChars" );
$cfgFieldHandlers['LengthLines'] = new Elvis_FieldHandlers_ReadOnly( "numberOfLines", false, "number", "LengthLines" );
$cfgFieldHandlers['LengthParas'] = new Elvis_FieldHandlers_ReadOnly( "numberOfParagraphs", false, "number", "LengthParas" );
$cfgFieldHandlers['LengthWords'] = new Elvis_FieldHandlers_ReadOnly( "wordCount", false, "number", "LengthWords" );
...
return $cfgFieldHandlers;
}
}
...
Step 3. Copy any of the fields for which you want to change the mapping to the Elvis_Config_GetAdditionalFieldHandlers function in the <Studio Server location>/config/config_overrule.php file of step 1.
Example: Here, the 'Author/creatorName' field is added. It maps the Elvis field creatorName with the Studio Server field Author.
|
Step 4. Modify the mapping by changing the parameters.
Note: For a list of all Assets Server metadata fields, see Metadata field information for Assets Server. For a list of all Studio Server metadata fields, see Overview of metadata properties used in Studio Server.
Example: Here, the Assets Server field 'creatorName' is mapped with the Studio Server custom field 'C_INVENTOR':
|
Step 5. Save the file.
Custom metadata fields
Tip: For more examples, see the comments in the configuration file.
Step 1. Open the <Studio Server location>/config/config_overrule.php file and verify if the following function exists. If it does not exist, add it. When done, leave the file open.
function Elvis_Config_GetAdditionalFieldHandlers()
{
// Field handler parameters: Assets Server fieldname, multivalue field, Assets Server data type, Studio Server fieldname
$cfgFieldHandlers = array();
// Paste the lines here ...
return $cfgFieldHandlers;
}
Step 2. Open the <Studio Server location>/config/config_elvis.php file and look up the section named 'ADVANCED config'. The comments contain various examples for mapping custom fields.
/**
* Mapping between Studio fields and Assets fields
*
* Note: Custom Studio fields and multi-value Assets fields cannot be mapped with other fields.
*
* .........
*
* Add them in a function named Elvis_Config_GetAdditionalFieldHandlers. This can be achived by copying the example
* function as shown below to the config_overrule.php file and uncomment it. Replace the sample handlers with the desired
* custom field handlers.
*
* function Elvis_Config_GetAdditionalFieldHandlers()
* {
* // Field handler parameters: Assets field name, multi-value field, Assets data type, Studio field name
* $cfgFieldHandlers = array();
* $cfgFieldHandlers['C_BOOlEANTEST'] = new Elvis_FieldHandlers_ReadWrite( "cf_BooleanTest", false, "boolean", "C_BOOlEANTEST" );
* $cfgFieldHandlers['C_DATETEST'] = new Elvis_FieldHandlers_ReadWrite( "cf_DateTest", false, "datetime", "C_DATETEST" );
* $cfgFieldHandlers['C_DATETIMETEST'] = new Elvis_FieldHandlers_ReadWrite( "cf_DateTimeTest", false, "datetime", "C_DATETIMETEST" );
* $cfgFieldHandlers['C_DOUBLETEST'] = new Elvis_FieldHandlers_ReadWrite( "cf_DoubleTest", false, "decimal", "C_DOUBLETEST" );
* $cfgFieldHandlers['C_INTEGERTEST'] = new Elvis_FieldHandlers_ReadWrite( "cf_IntegerTest", false, "number", "C_INTEGERTEST" );
* $cfgFieldHandlers['C_LISTTEST'] = new Elvis_FieldHandlers_ReadWrite( "cf_ListTest", false, "text", "C_LISTTEST" );
* $cfgFieldHandlers['C_MULTILINETEST'] = new Elvis_FieldHandlers_ReadWrite( "cf_MultiLineTest", false, "text", "C_MULTILINETEST" );
* $cfgFieldHandlers['C_MULTILISTTESTELVISMULTIFIELD'] = new Elvis_FieldHandlers_ReadWrite( "cf_MultiListTestElvisMultiField", true, "text", "C_MULTILISTTESTELVISMULTIFIELD" );
* $cfgFieldHandlers['C_MULTISTRINGTESTElVISMULTIFIELD'] = new Elvis_FieldHandlers_ReadWrite( "cf_MultiStringTestElvisMultiField", true, "text", "C_MULTISTRINGTESTElVISMULTIFIELD" );
* $cfgFieldHandlers['C_STRINGTEST'] = new Elvis_FieldHandlers_ReadWrite( "cf_StringTest", false, "text", "C_STRINGTEST" );
* // In case the mapping is only applicable for a specific brand, the brand Id ( e.g. 1) can be added.
* $cfgFieldHandlers['C_STRINGTEST'] = new Elvis_FieldHandlers_ReadWrite( "cf_StringTest", false, "text", "C_STRINGTEST", 1 );
* return $cfgFieldHandlers;
* }
*
* In the exceptional case that a field definition listed below needs to be changed, it is recommended to copy the
* field handler (that needs to be changed) from the Elvis_Config_GetFieldHandlers function below to the
* Elvis_Config_GetAdditionalFieldHandlers function in the config_overrule.php file and customize/change the attributes
* of the handler accordingly. This works because the fields listed in Elvis_Config_GetAdditionalFieldHandlers overrule(!)
* the ones listed in Elvis_Config_GetFieldHandlers. This makes it easier to maintain and upgrade an Studio Server installation.
*
* From Enterprise Server 10.5.0 onwards, the field handlers are listed in a new function named Elvis_Config_GetFieldHandlers.
*/
if( !function_exists( 'Elvis_Config_GetFieldHandlers' ) ) {
function Elvis_Config_GetFieldHandlers()
{
....
}
}
Note: The mapping is done by referencing the internal name of the custom metadata field. These names start with C_ and are in capital letters.
Step 3. Copy any of the fields for which you want to change the mapping to the Elvis_Config_GetAdditionalFieldHandlers function in the <Studio Server location>/config/config_overrule.php file of step 1.
Example: Here, the custom Studio Server metadata property 'C_DATETEST' is mapped to the custom Assets Server metadata field 'cf_DateTest':
|
Step 4. Modify the mapping by changing the parameters. (See also Mapping on Brand level below.)
Note: For a list of all Assets Server metadata fields, see Metadata field information for Assets Server. For a list of all Studio Server metadata fields, see Overview of metadata properties used in Studio Server.
Example: Here, the custom Studio Server metadata property 'C_MYCUSTOMFIELD' is mapped to the custom Assets Server metadata field 'cf_myCustomField':
|
Step 5. Save the file.
Mapping on Brand level
By default, the mapped field is available across all Brands in Studio Server. To make it available to specific Brands only, add the Brand ID to the mapping (see examples below).
Note: The mapping applies to all object types; it is not possible to map the custom field to a specific object type (meaning: not on Dossiers only, articles only, and so on).
Get the Brand ID by doing the following:
Step 1. Open a Web browser and log in to Studio Server.
Step 2. In the Maintenance menu or on the Home page, click Brands. A page showing a list of all Brands appears.
Step 3. Click on the Brand for which you need the ID.
The Brand Maintenance page appears. The Brand ID is shown at the end of the URL in the address bar of the browser.
Example: Here, the Brand ID is 1:
|
Examples
Tip: More example mappings can be found in the configuration file.
Example 1 Here, the custom Studio Server metadata property 'C_MYCUSTOMFIELD' is mapped to the custom Assets Server metadata field 'cf_myCustomField' for all Brands:
Example 2 Here, the custom Studio Server metadata property 'C_MyCustomField' is mapped to the custom Assets Server metadata field 'cf_myCustomField', but only for Brand with ID = 1:
Example 3 Here, the custom Studio Server metadata property 'C_INSTRUCTIONS' is mapped to the default Assets Server metadata field 'instructions' for all Brands:
|
Comment
Do you have corrections or additional information about this article? Leave a comment! Do you have a question about what is described in this article? Please contact Support.
2 comments
We are experiencing issues when mapping custom metadata field which are objecttype specific. For example on our images in StudioServer we have a custom metadata field called: C_IMAGE_ORIGINAL_CAPTION when we use above described procedure it appears that the mapping doesn't work and we're not able to drag and drop images from Assets to StudioServer. Is there specific configuration for this use case or is it not supported?
Hi Sander,
I have turned your question into a ticket for our Support team.
They will reply to you via that ticket.
Best regards,
Maarten van Kleinwee
Senior Technical Writer, WoodWing Software
Please sign in to leave a comment.