Using Data Traversal for detail page

I have a page of search results. I know I can link to a record detail page using the record id in a query parameter. What I would like to do is have previous/next buttons on the detail page, moving through the detail view of the records on the initial search results page.

I think I can use the Data Traversal extension to do this, but so far I haven’t been successful. The initial page is using a paged query - perhaps this is the problem (so far I can’t get any data to display). If a user clicks on record 5 of 50 records, I imagine I would have to pass the index to the detail page in order to start on the correct item. If that’s correct, how would I do that? Also, if the initial results are showing 10/page for example, will Data Traversal ignore this or do I have to reset the value for the limit?

Perhaps I have to start create a new query for the detail page, passing the parameters from the first query, as well as the index. Is this the right approach? I would be grateful for any suggestions.

Hello Tom
Can you explain what you need exactly? Client side paging with Data View or detail region with Data Detail?

Hi Teodor
I have a page showing a list of results from a paged query (not using client side paging). I would like the user to select an item to see a detail view of that item, on a separate page. This is no problem and what I would typically do. However, rather than switching back to the list view to select the next item, I would like to have previous/next buttons to move through the records (on the detail page).

I suppose I could do this using a limit of one, but that wouldn’t be very efficient - so I suppose client-side paging is probably a better approach. Anyway, I would be grateful for your advice.

The data detail region is used on the same, not as you currently do on a separate page.
On a separate page, just use a paged query limited to 1 record, filter it by what you are using now (probably an url param?). On the page, with the repeat region showing one record - just add next/prev buttons and control the paging using dynamic events.

Thanks Teodor. This is the solution I was thinking of, but obviously it means getting the informaiton from the server each time.

Is there a way of using Data Traversal to show detail views on separate pages, instead of on the same page?

You can achieve this with data traversal as well.
Use a normal (not paged query) and then on the page add data view.
Limit its records per page to be 1.
Assign a filter to it, then add next/prev buttons and control the data view paging using dynamic events :slight_smile: