Docs: use of pageEntry in pagination navigation
asheerrizvi opened this issue · comments
Asheer Rizvi commented
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.