Accessing the URL of the dynamic page in my collection from a VELO automation process

I need to generate QR codes for my dynamic pages. How can I obtain the URL of each dynamic page using VELO code? I have a collection and a field containing the content of the dynamic page called “Properties”. How can I retrieve the complete URL or the final URL of the page in a query?

My code is;

const collectionId = “Inmuebles”;

**const** results = **await** wixData.query(collectionId)

  .eq("referencia", referencia)

  .find();

return results.items[0].Properties

ERROR: Not URL.

image

There are multiple ways to fetch the page URL of your dynamic page, depending on your needs.

OR

  • You can use the wix-data API to fetch items in your CMS collection and form the URL using the page slug.

It depends on what you are trying to achieve, so the more details you’ll provide, the better we can help you out with a solution.