New in 1.27.0

attributeDefinitions()

Returns the attribute definitions of the corresponding CMS object class.

Returns

The attribute definitions of the corresponding CMS object class. The keys are attribute names, and the values are two-element tuples each of which consists of the attribute’s type (String) and the specification of the corresponding attribute:

  • values (Array of String or undefined) – The list of allowed values if the attribute type is enum or multienum, otherwise undefined.

  • only (Array of String or undefined) –

    • With a widgetlist attribute, the value of only is an optional list of widget class names. Only instances of these classes can be placed into the attribute. If the list is empty, widgets of any type can be placed into the attribute.

    • With a reference or a referencelist attribute, the value of only is an optional list of object class names. Only instances of these classes can be placed into the attribute. If the list is empty, objects of any type can be placed into the attribute. It is undefined otherwise.

Examples

Extract all textual content from a widget:

Find all widgets of a specific type on a page:

See Providing an Automatic On-Page Anchor Navigation.