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

Docs: use of pageEntry in pagination navigation #1497

Open
asheerrizvi opened this issue Nov 16, 2022 · 0 comments
Open

Docs: use of pageEntry in pagination navigation #1497

asheerrizvi opened this issue Nov 16, 2022 · 0 comments

Comments

@asheerrizvi
Copy link
Contributor

In the example for implementing pagination navigation we have this nav code:

<nav aria-labelledby="my-pagination">
  <h2 id="my-pagination">This is my Pagination</h2>
  <ol>
{%- for pageEntry in pagination.pages %}
    <li><a href="{{ pagination.hrefs[ loop.index0 ] }}"{% if page.url == pagination.hrefs[ loop.index0 ] %} aria-current="page"{% endif %}>Page {{ loop.index }}</a></li>
{%- endfor %}
  </ol>
</nav>

We name entity of pagination.pages as pageEntry, but within the if condition of the anchor tag we use page.url instead of pageEntry.url. I am somewhat confused if this is intentional or it should be pageEntry.url instead of page.url. Please close the issue if this isn't a relevant question.

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

1 participant