Documentation Center

Collective Spaces - BehaviorConfig.xml

The Collective Spaces user interfaces ship with default rendering and menu behavior for the DITA XML elements, defined in the DITA OASIS and SDL DTDs and schemas. You can customize Collective Spaces by editing the configuration file BehaviorConfig.xml, which is applied on top of the default behavior. In BehaviorConfig.xml, you define how DITA XML elements should be rendered for an XML document, which contextual menu items to show and which menu items to show in the Custom top menu tab.

You can find BehaviorConfig.xml on the file system of the Content Manager server in the Web\InfoShareCS\custom\ folder. This configuration file only affects the Collective Spaces user interfaces.

Out of the box, it only contains a root element and a reference to its schema file, BehaviorConfig.xsd, which you can use to validate the file as you edit it. Never change BehaviorConfig.xsd itself.

BehaviorConfig.xml can contain the following types of configuration:
Rendering configuration
The rendering configuration can:
  • change the out-of-the-box rendering of existing DITA XML elements
  • add rendering for specialized DITA XML elements specified in a custom DITA DTD or schema
If you want to have different behavior for the same XML element depending on the schema being used, you can limit parts of the configuration to a certain schema or schemas.
Context menu configuration
The context menu configuration specifies which context menu items to show when you are positioned in the configured DITA XML element.
Top menu configuration
The top menu configuration specifies which menu items to show in the Custom top menu tab. You cannot change any of the existing top menu items. You can only add extra menu items in the Custom top menu tab. If a user is at a certain insertion point, and if selecting a menu item at that insertion point would result in invalid XML, the menu item will be disabled.

Overview of the XML elements in BehaviorConfig.xml

behaviorconfig
This is the root element of the file.
behaviorscopegroup
Use this element to group together behaviorgroup elements. You can then use a scopetoschemas child element to ensure that the behaviors defined in those behaviorgroup child elements are only applied if the schema of the loaded XML document is one of the schemas listed under scopetoschemas.
behaviorscopegroup also has an optional name attribute in case you want to give the group a logical name.
scopetoschemas (optional)
The list of schemas to which the behaviors defined in this behaviorscopegroup should be restricted. If you omit this element, the behaviors are applied to all schemas, so for every opened XML document.
schema
This element specifies, in its location attribute, the file location of a schema to the behaviors defined in this behaviorscopegroup can be applied. Set the value to the file location of the schema relative to the DocTypes\ folder; that is, the value should match one of the schema location attributes configured in the SchemaLocationConfig.xml file.
behaviorgroup
This element groups one or more rendering behavior elements, contextual menu items or (top) menu items together.
behaviorgroup has an optional name attribute in case you want to give the group a logical name.
Rendering behavior elements
Use the following elements to specify how to render a DITA XML element that matches the XPath specified in its xpath attribute:
  • mapsheet
  • structureviewitem
  • sheet
  • sheetbody
  • title
  • block
  • inline
  • highlighting
  • list
  • image
  • blockgenericicon
  • inlinegenericicon
  • definitiontable
contextualmenuitems
Use this element to specify which contextual menu items to show when the user is positioned in an element matching the xpath attribute.
menuitems
Use thie element to specify which menu items to show in the top menu Custom tab.