# A. Breadcrumbs

Previously often generated through in-app service + listeners.
Only attribute config + custom Generators (only when needed) should replace previous systems.

- Content entity now has a _.hiddenBreadcrumbs property to mask breadcrumbs (must be set on ContentContext's main content)
- Content translation now has a _tr.breadcrumbsLabel property to override visible label

Upgrade procedure should verify that each content is configured using `BreadcrumbsHierarchy` php attribute to link entities to another entity or specify parent hierarchy path when needed.

## /!\ Deprecation:

`\AutoAdmin\Bundle\Content\Entity\Traits\HiddenBreadcrumbTrait` was used and is now deprecated

it was previously used to add a field and configure visibility, it is now deprecated and replaced by:

- \AutoAdmin\Bundle\Content\Breadcrumbs\Model\BreadcrumbsConfigInterface and its trait
- \AutoAdmin\Bundle\Content\Breadcrumbs\Model\BreadcrumbsConfigTranslationInterface and its trait


## BreadcrumbsHierarchy attribute examples:

For entity change, using property path:

```php
#[BreadcrumbsHierarchy(parentPath: 'category')]
class Faq extends Content {}
```

For entity change, another content:

```php
#[BreadcrumbsHierarchy(bridgeToContent: Page::class, bridgeToSlugAdmin: 'faq')]
class FaqCategory extends Content {}
```

Can also be used for hierachy traversing:

```php
#[BreadcrumbsHierarchy(parentPath: 'parent')]
class Page extends Content implements PublishableInterface, PageInterface, SelfHierarchyInterface
{}
```

## Complex cases

For complex cases, a custom generator can be created by extending \AutoAdmin\Bundle\Content\Breadcrumbs\Generator\AbstractBreadcrumbsGenerator or implementing its associated interface.

