Appearance
getCategoryBreadcrumbs
Definition
Gather breadcrumbs from category
Signature
ts
export function getCategoryBreadcrumbs(
category: Category | null | undefined,
options?: {
/**
* Start at specific index if your navigation
* contains root names which should not be visible.
*/
startIndex?: number;
}
)
Parameters
Name | Type | Description |
---|---|---|
category | Category | | undefined | category entity |
options | { /** * Start at specific index if your navigation * contains root names which should not be visible. */ startIndex?: number; } |
Usage
ts
const breadcrumbs = getCategoryBreadcrumbs(product.seoCategory);
ts
const breadcrumbs = getCategoryBreadcrumbs(categoryResponse.value, {
startIndex: 2,
});