Help for dynamic page

Hi Corentin,

few things to know here:

  1. To use string interpolation (template literals, putting variables into strings), you need to use back ticks `` and prepend the expression with a dollar sign $.

So in your case, something like:

wixLocation.to(`/Data/${C.I.D}`);
  1. You need to use actual ID from collection item. If you have ID visible in your table something like this would work:
wixLocation.to(`/Data/${event.rowData._id}`)

If it is a Dynamic Page, chances are you used other field like title (you need to replace spaces with dashes):

wixLocation.to(`/Data/${event.rowData.title.replace(' ', '-')}`)
  1. If you don’t have the field visible in the table, you may need to use a different event for this. In this case, you can add onCurrentIndexChanged event handler to the dataset. There you could:
const currentItemId = $('#dataset1').getCurrentItem()._id // Or other attribute used in URL
wixLocation.to(`/Data/${currentItemId}`)

Let me know if you need any further assistance!