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.
- 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
- 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
behaviorgroupelements. You can then use ascopetoschemaschild element to ensure that the behaviors defined in thosebehaviorgroupchild elements are only applied if the schema of the loaded XML document is one of the schemas listed underscopetoschemas. scopetoschemas(optional)-
The list of schemas to which the behaviors defined in this
behaviorscopegroupshould 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
locationattribute, the file location of a schema to the behaviors defined in thisbehaviorscopegroupcan be applied. Set the value to the file location of the schema relative to theDocTypes\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.
- Rendering behavior elements
-
Use the following elements to specify how to render a DITA XML element that matches the XPath specified in its
xpathattribute:mapsheetstructureviewitemsheetsheetbodytitleblockinlinehighlightinglistimageblockgenericiconinlinegenericicondefinitiontable
contextualmenuitems-
Use this element to specify which contextual menu items to show when the user is positioned in an element matching the
xpathattribute. menuitems- Use thie element to specify which menu items to show in the top menu Custom tab.