Copying a post in my repeater to a new page

I have created an add button at the bottom of my posts in my repeater which links to a different page. The purpose of this button is for users to add a specific post on the repeater to a new page. Would anyone know how I can go about achieving this?

Hi,

The main challenge here is to pass the repeater item context to the new page, for example using the item id
This is done using the onItemReady and requires code.

$w.onReady(function () {
    $w("#myDataset").onReady( () => {
      $w("#myRepeater").forEachItem( ($item, itemData, index) => {
          $w('#button').link = "https://www.somesite.com/pagename?itemId=" + itemData._id
      } );
  } );
} );

Then, on the new page, read the data using wixLocation.query and create the new item according to your requirements.

I was able to get the first half done. But can you provide an example of what the wixLocation.query would look like? The information from the first page is being copied from a repeater to display in another repeater on the second page.