Forum
Pagination 'Previous' link has active assigned
Hi Have noticed when using page-links with pagination that when on Page 2 the Previous link has the class active added to both the a href and li?
Any idea how to avoid/fix. Odd that it only happens when on Page 2
<perch:if exists="paging">
<div class="paging">
<ul class="pagination">
<perch:if exists="not_first_page">
<li><a href="<perch:content id="prev_url" type="hidden" encode="false" />"><i class="la la-angle-left"></i></a></li>
</perch:if>
<perch:content id="page_links" encode="false" type="hidden" />
<perch:if exists="not_last_page">
<li><a href="<perch:content id="next_url" type="hidden" encode="false" />"><i class="la la-angle-right"></i></a></li>
</perch:if>
</ul>
<p>Pages <perch:content id="current_page" type="hidden" /> of <perch:content id="number_of_pages" type="hidden" /></p>
</div>
</perch:if>
and page links
<perch:before></perch:before>
<li class="page-item <perch:if exists="selected">active</perch:if>">
<perch:if exists="spacer">
<perch:pages id="page_number" />
<perch:else />
<a href="<perch:pages id="url" />">
<perch:pages id="page_number" />
</a>
</perch:if>
</li>
<perch:after></perch:after>
Thanks
Remove
<perch:if exists="selected">active</perch:if>
Hi Drew We need active on the page-links to show which page you're on. The Prev link is getting an active class when on Page 2.
Can't work out why. Thanks
Can you show me the incorrect HTML that the template is producing?
Sorry Drew, looks like it is a jquery issue, nothing to do with Runway. Thanks again