Patrick64 / reefine

ExpressionEngine addon that filters and searches entries
MIT License
5 stars 1 forks source link

Active pagination status Index not shown on 'reefined' page #18

Open amadeus77 opened 1 year ago

amadeus77 commented 1 year ago

Setup: EE 7.3.11. Freebie 3.2.3 Reefine 3.1.1

Using freebie to let ee ignore the "reefine segment" in the URL. I have to use fix_pagination = "yes" Without it the "reefine segment" is stripped out in the target url when clicking on a pagination page link on a page filtered by reefine. When using fix_pagination = "yes" the URL keeps the "reefine segment" and the pagination segment ('P10', P20', ...) is shown at the end of the url as intended. Also the result entries are the rigt ones. But the right active page index is not in the pagination links. The active status stays always "1", and the pagination links are not clickable as they should be. (e.g. not possible to click on page "1", when showing the second page of results, because page "1" is always active.)

Until the latest version of ee6 this worked.

Patrick64 commented 1 year ago

Hi.

Are you using a querystring? I've been working on something similar at the moment actually. Here's the code I used for pagination that adds the query string on the end if that helps:

{paginate}  
<li class="has-short-buttons pagination">
<div class="pagination-inner">
    <p>Page {current_page} of {total_pages} pages</p>
    <p>
        {pagination_links}
            {first_page}<a href="{pagination_url}?{current_query_string}">&lsaquo; First</a>{/first_page}
            {previous_page}<a href="{pagination_url}?{current_query_string}">&lsaquo; Prev</a>{/previous_page}
            {page}
            {if current_page}
                <strong>{pagination_page_number}</strong>
            {if:else}
                <a href="{pagination_url}?{current_query_string}">{pagination_page_number}</a>
            {/if}
            {/page}
            {next_page}<a href="{pagination_url}?{current_query_string}">Next &rsaquo;</a>{/next_page}
            {last_page}<a href="{pagination_url}?{current_query_string}">Last &rsaquo;</a>{/last_page}
        {/pagination_links}
    </p>
</div>

</li>
{/paginate}
amadeus77 commented 1 year ago

I only use the "standard" pagination links

{paginate}
<div class="w-100 pt-5 px-2 px-sm-0 d-flex justify-content-center pagination">
    {pagination_links}
</div>
{/paginate}

I did sent you a staging site link through DM in slack. Can't post this here.

Patrick64 commented 1 year ago

Looks like I can't access that link. Can you post the code in your reefine block?

amadeus77 commented 1 year ago

Responded in Slack via DM. Sorry don't want to post the whole code here.