Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breadcrumbs return no data #48

Open
simplerethink opened this issue Dec 29, 2022 · 5 comments
Open

Breadcrumbs return no data #48

simplerethink opened this issue Dec 29, 2022 · 5 comments

Comments

@simplerethink
Copy link

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 %}
@pdehaan
Copy link

pdehaan commented Dec 30, 2022

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>

@simplerethink
Copy link
Author

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

@octipus
Copy link

octipus commented Apr 21, 2023

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

@davidakennedy
Copy link

davidakennedy commented Jun 3, 2024

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.

@Ryuno-Ki
Copy link

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>

Can confirm. Also same results with Eleventy 3.

Can you share a test repo where the breadcrumbs come up empty?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants