How to access the slug for a reference field in a collection list?

In a collection list, you can access a referenced item’s fields, but not its slug.

I have a subcategory collection that has a single reference to category. I’m trying to build a breadcrumb structure with a link using the category slug, and a second link using the subcategory slug. Adding the subcategory collection, I can build the second link and display the first, but not link it, because I can only access the category’s name and other fields, and not it’s slug. Thoughts?

Much simpler to solve this by using redirects on the collection template pages themselves.

On the category page, redirect to the homepage with the query param:

On the subcategory template page, redirect to the homepage with both query params:

You can access the referenced item’s slug in the page’s custom code, which solves the original problem.