Skip Navigation

[Resolved] Auto Number should come in View List

This support ticket is created 6 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 1 reply, has 2 voices.

Last updated by Beda 6 years, 5 months ago.

Author
Posts
#952282

I am trying to: Add Auto Numbering in View List

Link to a page where the issue can be seen: hidden link

I expected to see: Serial Number should increase from 1 to till last value like in this page we have 1535 club then it will show in serial number wise

Instead, I got: but when i move to pagination 2 then again start from 1. Please help me generate correct serial number and on moving to page 2 it should start with 21 serial number

#952777

You mean, the List that is generated by the HTML.
This is not possible, as the HTML, generates the list automatically on hand of the data received.
You would hence need to always show all data to the HTML, then somehow hide the chunks that where paginated away, so to keep the lists perpetuity .

It is expected that when a output is paginated, the list is not continuing but re-iterating.

What you can do to solve this issue is adding a Custom Field to the Post (number) where you store the simple order number which you can then display instead of letting HTML generate a List for you.
This binds you however to a not dynamic possibility to re-order those posts (you will need to order them by that new number field)

Minimally you can try to play with the HTML ol start attribute:
hidden link

That allows you to set a certain start for a list.
But, that still does not help in a loop, since as loop will iterate for each item once.
So, you would let each item start at the same number (just as it does now)

You could try with HTML conditional and listing to the Pagination URL attribute to start the list conditionally to the current page:

[wpv-conditional if="( '[wpv-search-term param='wpv_paged']' eq '2' )"]<ol class="wpv-loop js-wpv-loop" start="2">[/wpv-conditional]
    [wpv-conditional if="( '[wpv-search-term param='wpv_paged']' eq '3' )"]<ol class="wpv-loop js-wpv-loop" start="3">[/wpv-conditional]

However, if you have a lot of pages this may get cumbersome.
But it's the only way to achieve it.