Skip to main content

Bundles

Introduction

Bundles are elements that can be placed on UI screens, included in search forms or displays. They can be attributes of a specific element set or database fields intrinsic to a specific item type. Bundles can be functional elements that allow cataloguers to establish relationships between items, add and remove items from sets and manage an item’s location in a larger hierarchy. Bundles are so named because they are essentially black-boxes that encapsulate various functionality.

Below is a break down of the bundle classes and the properties that are particular to each type.

Bundle TypeAlso Known AsDescriptionExample
Basic bundleAdministrative bundle, Intrinsic bundleAlways present regardless of configuration. Single data entry; does not repeat.access
Relationship bundleRelated tableBundles that create relationships between items.ca_objects
Label bundlesName or Title bundleHuman-readable short descriptions used for display to identify a record.preferred_labels
Attribute bundlesMetadata elementAny field created by a user.ca_attribute_elementcode
Special bundlesBundles that allow a cataloger to manage an item’s locations in, for example, sets and hierarchieshierarchy_location

User interface Settings

There are several settings that can be used to configure all bundles, regardless of type, when they are placed on a user interface screen.

SettingsDescriptionDefaultValues
labelCustom label text to use for this placement of this bundle.
add_labelCustom text to use for the add button for the placement of this bundle.
descriptionDescriptive text to use for help for bundle. Will override descriptive text set for underlying metadata element, if set. Make sure to include a locale specification, i.e. <setting name=”description” locale=”en_US”>XXX</setting>
readonlyIf checked, field will not be editable.0 (not read only)0 or 1
expand_collapse_value(Available for v1.5) Controls the expand/collapse behavior when there is at least one value present. While technically available for most bundles, the setting might have no effect for some of the “special” bundles. They have extra settings, see below.dont_force (default behavior = save expand/collapse state when the user changes it)dont_force, collapse, expand
expand_collapse_no_value(Available for v1.5) Controls the expand/collapse behavior when there is no value present. While technically available for most bundles, the setting might have no effect for some of the “special” bundles. They have extra settings, see below.dont_force (default behavior = save expand/collapse state when the user changes it)dont_force, collapse, expand

However, there are type-specific settings as well, outlined below.

Bundle TypeSettingsDescriptionDefaultValues
Special (hierarchy_location and hierarchy_navigation only)open_hierarchyIf checked hierarchy browser will be open when form loads.1 (open)0 or 1
Special (hierarchy_location and hierarchy_navigation only)auto_shrinkIf enabled hierarchy browser will shrink to height of contents. Version 1.5 and later.1 (shrink)0 or 1
Special (hierarchy_location, hierarchy_navigation and ca_objects_history only)expand_collapseControls the expand/collapse behavior for this bundle.dont_force (default behavior = save expand/collapse state when the user changes it)dont_force, collapse, expand
Relationship (ca_list_items only)restrict_to_listsRestricts display to items from the specified list(s). Leave all unselected for no restriction.list code
Relationship (ca_list_items, ca_storage_locations, ca_places only)useHierarchicalBrowserIf set a hierarchy browser will be used to select the related item rather than an auto-completing text field.00 or 1
Relationship (ca_list_items, ca_storage_locations, ca_places only)hierarchicalBrowserHeightThe height of the hierarchical browser displayed when theuseHierarchicalBrowser option is set.200pxA pixel dimension ending with ‘px’ (eg. 500px
Relationship (ca_objects)restrictToTermsRelatedToCollectionWill restrict checklist to those terms applied to related collections.00 or 1
Relationship (ca_objects)restrictToTermsOnCollectionWithRelationshipTypeWill restrict checklist to terms related to collections with the specified relationship type. Leave all unselected for no restriction.type code
Relationship (ca_objects)restrictToTermsOnCollectionUseRelationshipTypeSpecifies the relationship used to relate collection-restricted terms to this object. (Required if usingrestrictToTermsRelatedToCollection)type code
Relationshiprestrict_to_relationship_typesRestricts display to items related using the specified relationship type(s). Leave all unselected for no restriction.type code
Relationshiprestrict_to_typesRestricts display to items of the specified type(s). Leave all unselected for no restriction.type code
Relationshipdont_include_subtypes_in_type_restrictionNormally restricting to type(s) automatically includes all sub-(child) types. If this option is checked then the lookup results will include items with the selected type(s) only00 or 1
Relationshiplist_formatFormat of relationship list.bubblesbubbles or list
RelationshipdontShowDeleteButtonIf checked the delete relationship control will not be provided.00 or 1
RelationshipminRelationshipsPerRowSets the minimum number of relationships that must be catalogued to save.emptynumeric value
RelationshipmaxRelationshipsPerRowSets the maximum number of relationships that must be catalogued to save.emptynumeric value
Relationshipdisplay_templateLayout for relationship when displayed in list (can include HTML). Element code tags prefixed with the ^ character can be used to represent the value in the template. For example: ^my_element_code.^preferred_labelsUses thebundle display template syntax
RelationshipcolorFirstItemIf set first item in list will use this color.
RelationshipcolorLastItemIf set last item in list will use this color.
Relationship or AttributesortMethod used to sort related items.For attributes: use target element code for sort without table or container path i.e. dates_value NOT ca_objects.date.dates_value. To sort on order created do not use the sort setting at all, use only sortDirection. For relationships: use the target element code for sort WITH full table/container path. Use relation_id to set to order created.
Relationship or AttributesortDirectionDirection of sort, when not in a user-specified order.ASCASC or DESC
Attribute or LabelusewysiwygeditorCheck this option if you want to use a word-processor like editor with this text field. If you expect users to enter rich text (italic, bold, underline) then you might want to enable this.0 or 1
Attribute or LabelwidthWidth of the placement on the UIpixels or characters
Attribute or LabelheightHeight of the placement on the UIpixels or characters
Relationship or Labeldocumentation_urlA documentation link for the bundleURL
Special (ca_objects_history)full list of settings hereThe Object Use History bundle has many settings. See the included link for a full list.

Here’s an example of how some of the settings above would look at the code-level in an xml profile:

<placement code="ca_film">
<bundle>ca_objects</bundle>
<settings>
<setting name="restrict_to_types">film</setting>
<setting name="label" locale="en_US">Related films</setting>
<setting name="add_label" locale="en_US">Add film</setting>
</settings>
</placement>

Display Settings

From /app/models/ca_bundle_displays.php

Global display settings:

SettingsDescriptionDefaultValues
show_empty_valuesIf checked all values will be displayed, whether there is content for them or not.10 or 1

Bundle display settings for all types:

SettingsDescriptionDefaultValues
labelCustom label text to use for this placement of this bundle.Text

Type-specific bundle display settings:

Bundle TypeSettingsDescriptionDefaultValues
Label, Attribute, RelationshipdelimiterText to place in-between repeating values.
Label, AttributeformatTemplate used to format output.
Label, Attributemaximum_lengthMaximum length, in characters, of displayed information.100Characters
RelationshipmakeEditorLinkIf set name of related item will be displayed as a link to edit the item.0 (not a link)0 or 1
Relationshiprestrict_to_relationship_typesRestricts display to items related using the specified relationship type(s). Leave all unselected for no restriction.type code
Relationshiprestrict_to_typesRestricts display to items of the specified type(s). Leave all unselected for no restriction.type code
Relationshipshow_hierarchyIf checked the full hierarchical path will be shown.1 (full hierarchy shown)0 or 1
Relationshipremove_first_itemsIf set to a non-zero value, the specified number of items at the top of the hierarchy will be omitted. For example, if set to 2, the root and first child of the hierarchy will be omitted.0Integers zero or greater based on hierarchy
Relationshiphierarchy_orderDetermines order in which hierarchy is displayed.ASC (top first) DESC (bottom first)
Attributeshow_empty_valuesIf checked all values will be displayed, whether there is content for them or not.10 or 1
AttributefilterExpression to filter values with. Leave blank if you do not wish to filter values.^ca_objects.dimensions.Type IN (“with_frame”)

Search Form Settings

Regardless of type, bundles can take the follow setting when they are used in search forms.

SettingsDescriptionDefaultValues
labelCustom label text to use for this placement of this bundle.Text
widthWidth, in pixels, of search form elements.100pxA pixel dimension ending with ‘px’ (eg. 500px)