How do I link from one page to a specific point in a list in another page?

Current set-up : SPA Pages, Windows 10, MySQL, PHP


Clicking the pencil gives this URL

from this routed code on one page

<a dmx-bind:href="'./business/'+business_id" internal></a>

and currently takes the user to the second page

I want the view to show the relevant business highlighted as if it were selected, and on the correct paginated page like this

but I can’t work out what I need to do.

I need to pass the '515' to somewhere, but where and how?

I have managed to solve this little problem.

What I didn’t realise or understand was that the routed URL parameter had to be picked up using
'params.business_id' and not '$_GET.business_id'.

'params.business_id' was then passed to the query and once I’d played around with conditions I managed to get it all working.

I then had to use the 'Clear' button on the filter input field and set the click dynamic event to

  • setValue for the filter input field to ''
  • browser.goto to './business' which relaoaded the unfiltered query (show all records)
  • setValue for the 'business_ID_var' to '' which is the variable used to display the detail section on the right.

Hope this helps for anybody that comes across a similar problem.

1 Like