# Breadcrumbs: How to set up dynamic content with metafields

### Overview

The breadcrumbs section can be customized to show different parent collections for different products by using product metafields. This allows for more flexible navigation paths based on your product's specific categorization.

### Setting Up the Metafield

1. First, create a metafield definition for your products:

* Go to Settings > Custom data > Products
* Click "Add definition"
* Configure the metafield

```
Name: Breadcrumb collections
Namespace: breadcrumb_collections
Key: custom
Reference to: Collection
```

{% embed url="<https://share.zight.com/8LuELlB0>" %}
How to set up the breadcrumb metafield
{% endembed %}

Add collections to individual products:

* Go to any product in your admin
* Scroll down to "Metafields"
* Find the "Breadcrumb collections" field
* Select the collections you want to appear in the breadcrumbs
* Save the product

{% embed url="<https://share.zight.com/bLu27QRm>" %}

### Connect the metafield

To use the metafield instead of the static collection list:

1. Go to your theme customizer
2. Add or find the Breadcrumbs section from Design Packs
3. Enable "Show parent collections"
4. Select the 'Breadcrumb collections' metafield&#x20;

{% embed url="<https://share.zight.com/P8uzAwGq>" %}

### How It Works

The breadcrumbs will follow this logic:

* If a product has collections set in its custom.breadcrumb\_collections metafield, those collections will be shown

### Example Use Cases

Multi-level Categories

```
Home > Furniture > Living Room > Sofas > Leather Sofa
```

Cross-Category Products

```
Home / Sale Items / Summer Collection / Beach Chair
```

Brand-specific Navigationtext

```
Home > Brands > Nike > Running > Air Max
```

### Best Practices

1. Consistency: Maintain a consistent depth of navigation across similar products
2. Relevance: Choose the most relevant collections for each product
3. Maintenance: Regularly review and update metafields when product categorization changes

### Limitations

* Maximum of 10 collections can be referenced in the metafield
* Collection order in the breadcrumbs will match the order in the metafield
* Changes to collection handles will require updating the metafield values

### Need Help?

If you need assistance setting up product metafields or customizing your breadcrumbs, please contact our support team at <support@design-packs.com>.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://design-packs.gitbook.io/docs/fundamentals/section-tutorials/breadcrumbs-how-to-set-up-dynamic-content-with-metafields.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
