Thread tagged as: Problem, Runway

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: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>


        <p>Pages <perch:content id="current_page" type="hidden" /> of <perch:content id="number_of_pages" type="hidden" /></p>


and page links


    <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" />



Keith Winter

Keith Winter 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

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

Drew McLellan

Drew McLellan 2638 points
Perch Support

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