Asset listing next page links are reloading initial search form


(Awilliams) #1

I have an asset listing page with page links which when you click on the next page link reloads the initial search page.
So there’s a custom form with variables linked to a DB source, and the results are pulled in through an asset listing page (so far everything works perfectly) but I don’t want to show more than 10 results at a time so am using page links. The url for the links looks correct (in that it’s saying page 2 of the asset listing page) but it just keeps going back to the original form.

Does anyone have any idea why this might be happening? I’m stumped.

Thanks


(Bart Banda) #2

Hey, I’m a bit confused about your setup, are you using an Asset Listing, Search Page, and a Custom Form all together on the same page?

Can you explain a bit more about how your implementation is set up? Screenshots would be handy to.


(Awilliams) #3

Hi Bart,

It’s a form used to query a database that pulls the results into an asset listing page which is nested into a standard page.
The default format of #776602 (the asset listing page with the results) in the screenshot, has a table row containing the variables from DB source #777938. Then the page contents format has a table with headings with the asset contents as a row. This all works fine, but the page links just reload the form.

You can see it in action here: http://www.dartmoor.gov.uk/planning/db-links/planning-searches/search-applications

It ought to be something simple but I’m totally stumped, it should all work in theory. If you choose a location from the dropdown it brings back pages of results, but the when you try to click on a page link to view the next 10 results, it’s not having any of it.


(Bart Banda) #4

Ok, so it looks like your SP with the AL is nested into the thank you page of the form? If that’s the case then the pagination links on the asset listing will be relative to that form’s url, which when clicked, will not do a POST request but rather a GET request to the form again which in turn will load the default format of the custom form again.

I think you might need to pass all the DB variables to the Asset Listing on a different URL as GET parameters so that when you click on each link in the pagination it keeps the GET parameters in the URL.

This means you actually probably don’t need the custom form at all, you can just hard code the form fields and the form action to be a GET request to the Asset Listing Page.

Hope that makes sense.


(Awilliams) #5

Thanks Bart,
Yes that does make sense. I shall hard code the form instead.
Thanks for your help.

Amanda