eleventy-navigation icon indicating copy to clipboard operation
eleventy-navigation copied to clipboard

Breadcrumbs return no data

Open simplerethink opened this issue 2 years ago • 5 comments

Could someone explain why I don't get any data for breadcrumbs?

---
eleventyNavigation:
  key: My Page Title
  parent: myParentKey
---
{% set crumbs = collections.all | eleventyNavigationBreadcrumb(eleventyNavigation.key) %}
{% for crumb in crumbs %}
  <a class="crumb" href="{{ crumb.url | url }}">{{ crumb.title }}</a>
  ...
{% endfor %}

simplerethink avatar Dec 29 '22 15:12 simplerethink

I think this is working for me in https://github.com/pdehaan/11ty-nav-48

The homepage has no breadcrumbs, but if you look at www/pages/index.html, you should see:

<a class="crumb" href="/">myParentKey</a>

pdehaan avatar Dec 30 '22 19:12 pdehaan

@pdehaan thank you! I'll do some more digging. I keep getting [ ] even for nested pages within my site.

simplerethink avatar Dec 31 '22 02:12 simplerethink

@simplerethink i can confirm i get the same empty array []. I'm using version 2.0.1

octipus avatar Apr 21 '23 00:04 octipus

Chiming in to say that I'm getting the same empty array, both in a personal site, and on the test repository from @pdehaan. I'm also running version 2.0.1.

davidakennedy avatar Jun 03 '24 00:06 davidakennedy