Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Fields are displayed informations about assets and can be set up depending on your needs.

NamedFieldConfig description

NamedFieldConfig are named field configurations. This allows to define fields once and to re-use them across different contexts.

NamedFieldConfig are defined in $.common.namedDisplays. It can be one of:

  • A string reflecting a NamedFieldConfig

  • A string reflecting a field name (as defined in the admin structure area)

  • An ItemFieldConfig

ItemFieldConfig description

An ItemFieldConfig reflects a single field. It can be defined as:

  • A string representing the field you want to create. This is equivalent to creating a FieldConfig by only specifying the field property :

Code Block
languagejson
"myfieldname"
// equivalent to
{
  "field": "myfieldname"
}

  • A FieldConfig describing the field.

FieldConfig description

An Object representing a given field.

Property

Type

Default

Description

field

String

No default value

Can refer to another named field config or to a field name described in the admin area

withoutLabel

Boolean

false

Do not display the name of the field before the value

withBullet

Boolean

true

Display a bullet before the field

itemClass

String

No default value

Add class to the corresponding field

label

String

No default value

Label to display (by default the name of the field will be used)

i18n

String

No default value

I18n key to use for the label

showIfEmpty

Boolean

false

Show field even if the field has no value

Additional FieldConfig properties for Relationship fields

Property

Type

Default

Description

badge

Boolean

false

Display field value(s) as a badge

clickable

Boolean

false

Is badge clickable or not. Clickable property will have no effect if badge is set to false.

operator

String

in

When a badge is clickable, the click action is to redirect the user to the search page. The value of the field will be used in the search page, you can decide which operator will be used by modifying the value of this property.

incrementCurrentConstraint

Boolean

true

Add constraint to existing ones or replace it. Targets only the corresponding field, not all constrains.

Additional FieldConfig properties for Date fields

Property

Type

Default

Description

dateFormatI18n

String

"global.details.dateformat.long"

Which value to use to format dates. The value is placed in i18n files as the format should be internationalised. Internally we use moment to manipulate dates, see a list of accepted formats here.


Additional FieldConfig properties for Asset fields

Property

Type

Default

Description

cwVariation

String

tiny

Choose the variation to display

emptyMessageI18n

String

dam.details.defaultEmptyMessage

I18n message to display in case of empty field

resourceClass

String

h-100 w-100 fit-cover cw-thumbnail-circle

Classes to add to the field

resourceWrapperClass

String

cw-collaborator cw-thumbnail-50-3 cw-thumbnail-circle bg-white mr-2

Classes to add to the wrapper

Additional FieldConfig properties for String fields

Property

Type

Default

Description

tooltipOptions

Object

No default value

Handle options for tooltips. v-b-tooltip is used internally, see the documentation page for all available options.