top of page

Displaying collection data

I'm a paragraph. Click here to add your own text and edit me. It's easy.

import wixData from 'wix-data';

$w.onReady(async function () {

         const database = await wixData.query('COLLECTION_ID').find();

         const databaseItems = database.items;

         $w('#repeater').onItemReady(($, item) => {

                  $('#textElement').text = item.textField;

                  $("#image").src = item.imageField;

                  $('#video').src = item.videoField;

         });

         $w('#repeater').data = databaseItems;

});

bottom of page