Element creation
If configured by the administrator the following options are available:
- Insertion of elements via the add element menu can now insert element templates including attributes and child elements.
- When editing elements, new template based sibling elements can be inserted by pressing return.
Templates are defined within a template element as part of the ui-description of a storage item node source (Path
ui-description/elements/element/templates/template
).- The element that will have the focus after insertion needs to contain the focus attribute with value true from the censhare namespace (see example)
- Possible attributes for the template element are
on-key
: hotkey to trigger the template, default isreturn
, required for all non-default templates. Currentlyreturn
is the only supported value.when-parent
: parent path condition, default is no condition, optional, matched by path depth and document orderinsertion-path
: path to the previous ancestor for the insertion, default is current element, optional, only(../)+
allowed- To define the default template to be used by the add element menu omit any attributes on the template element
Example:
|
Element grouping
The elements in the “create element” list can be grouped. The groups are declared in ui definition xml of the according storage node source. Groups are identified by their name. To declare a group create a group element, with attribute name containing the groups unique name, as a child of the groups element below the ui-description element. To assign a element to a group simple add the attribute group containing the name of the group, to the element node. E.g.:
|
- The groups are ordered in document order.
- The elements within the group are order alphabetically in relation to their localized display name.
- Elements that are not assigned to any group are implicitly assigned to a default group that will be displayed as last group.