Search.../

itemsBeforeEllipsis

Sets or gets the number of items that appear in the breadcrumbs trail before an ellipsis.

Description

Represents the number of items that appear in the breadcrumbs trail before an ellipsis.

Consider the following when setting itemsBeforeEllipsis:

  • Defaults to 1.
  • Setting itemsBeforeEllipsis to a value less than 1 fails with an error. Setting it to a value greater than the total number of items in the breadcrumbs trail means the ellipsis isn't displayed under any circumstances.
  • If the sum of itemsBeforeEllipsis and itemsAfterEllipsis is greater than or equal to the total number of items in the breadcrumbs trail, the ellipsis isn't displayed under any circumstances.

Type:

numberRead & Write

Was this helpful?

Get the number of items that appear before an ellipsis

Copy Code
1let beforeEllipsis = $w('#myBreadcrumbs').itemsBeforeEllipsis; // 2
Set the number of items that appear before an ellipsis

Copy Code
1$w('#myBreadcrumbs').itemsBeforeEllipsis = 2;
Increase the number of items before an ellipsis for breadcrumb trails under a certain length

Copy Code
1if ($w('#myBreadcrumbs').items.length < 5) {
2 $w('#myBreadcrumbs').itemsBeforeEllipsis = 5 - $w('#myBreadcrumbs').items.length;
3}