Adding fields to a cardtype
A card type defines the behavior of objects in Content Manager. Card types themselves cannot be created nor removed from the database. But an existing card type can be extended with customer-defined fields by using TriDK XML Setup.
Procedure
Example
The following example script assigns a number of customer-defined fields to a number of card types. It makes no difference whether the assigned field is an LOV, a date, etc.
The fields
FMANUALTYPEandFDEPARTMENTare added to all topics at the logical level (CTMAP). The assumption is that all versions and translations of that logical object belong to the same manual type and department.The field
FMANUALTYPEis added to all images at the logical level (CTIMG). The assumption is that all versions and resolutions of that image belong to the same manual type.The field
FTRANSLATIONDUEDATEis added to all topics at the language level (CTMAPL). The assumption is that each translation can have a different translation due date.The field
FGRAMMARREVIEWERis added to all topics at the language level (CTMAPL). The content of this field comes from the card type “USER”. The assumption is that each translation can have a different grammar reviewer.The field
FTRANSLATIONDUEDATEis added to all maps at the language level (CTMASTERL). The assumption is that each translated map can have a different translation due date.- The field
FOPSYS(Operating System) is added to all topics at the logical level (CTMAP). The content of this field has Windows as default value.
<tridk:setup xmlns:tridk="urn:trisoft.be:Tridk:Setup:1.0" xml:lang="EN">
<tridk:cardtypes>
<tridk:cardtype tridk:metatype="card" tridk:element="CTMAP">
<tridk:fielddefinition>
<tridk:cardtypefield tridk:element="FMANUALTYPE"/>
<tridk:cardtypefield tridk:element="FDEPARTMENT"/>
<tridk:cardtypefield tridk:element="FOPSYS">
<tridk:defaultvalue>Windows</tridk:defaultvalue>
</tridk:cardtypefield>
</tridk:fielddefinition>
</tridk:cardtype>
<tridk:cardtype tridk:metatype="card" tridk:element="CTIMG">
<tridk:fielddefinition>
<tridk:cardtypefield tridk:element="FMANUALTYPE"/>
</tridk:fielddefinition>
</tridk:cardtype>
<tridk:cardtype tridk:metatype="card" tridk:element="CTMAPL">
<tridk:fielddefinition>
<tridk:cardtypefield tridk:element="FTRANSLATIONDUEDATE"/>
<tridk:cardtypefield tridk:element="FGRAMMARREVIEWER”/>
<tridk:sequence tridk:value="1"/>
<tridk:memberdefinition>
<tridk:member tridk:element="USER"/>
</tridk:memberdefinition>
</tridk:cardtypefield>
</tridk:fielddefinition>
</tridk:cardtype>
<tridk:cardtype tridk:metatype="card" tridk:element="CTMASTERL">
<tridk:fielddefinition>
<tridk:cardtypefield tridk:element="FTRANSLATIONDUEDATE"/>
</tridk:fielddefinition>
</tridk:cardtype>
</tridk:cardtypes>
</tridk:setup>