0

I am using AB Pagination to paginate news stories. When I click the numbered (and the next and previous) links, the URI segment is /P10, /P20, /P30. I would like the URI segment to be /P1, /P2, /P3. Does anyone know if this is possible? If so, how could I implement this?

Here is the channel entry tag I am using:

{exp:channel:entries 
    channel="news"
    disable="member_data|trackbacks"
    limit="10"
    sort="desc"
    status="open|featured"
}

and here is the pagination code I am using:

{paginate}
    <ol class="page-list group__title">
        {if abp_has_previous}
            <li><a href="{abp_previous_link}"><</a></li>
        {/if}
        {abp_pages}
            {if abp_is_current}
                <li><a class="is-active">{abp_num}</a></li>
            {if:else}
                <li><a href="{abp_link}">{abp_num}</a></li>
            {/if}
        {/abp_pages}
        {if abp_has_next}
            <li><a href="{abp_next_link}">></a></li>
        {/if}
    </ol>
{/paginate}
1

ExpressionEngine uses the data from the pagination segment as an offset, not a "page number", per se. So even if you could change the values to P1, P2, etc, they would then yield incorrect results (if you wish to use EE's built-in dynamic pagination that is).

0

Code Igniter framework actually enables such option:

$config['use_page_numbers'] = TRUE;

and it works, but I don't know whether it's compatible with AB Pagination. If not, then well, shame on'em.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.