Did you already have worked with code?
If you never have worked with code before, this will be a very difficult task for you.
How to get your goal ?
- Create your ProGallary on your site (page).
- Modify all your ProGallary-Items like you want, directly inside of your ProGallary.
- Create a BACKEND-FILE → called proGallary.jsw.
- Write some code for the backend to get your wished functionality…
a) You will need the ProGallary-ID first (but how and where to get it?)
Generate a CODE which will get a list of all your GALLARIES…
export async function myListGalleriesFunction() {
try {
let galleryList = await proGallery.listGalleries();
return galleryList;
} catch (error) {
console.error(error);
// Handle the error
}
}
…or… get the GALLARY-ID directly from the PROPERTY-PANEL of your ProGallary inside of the Wix-Editor, by a click onto your → ProGallaray → SUPPORT -->scroll down till you see the ID of your current selected ProGallary.
The code above will go to the BACKEND-SECTION into your → “proGallary.jsw” -file.
b) Next step you will need to write a GALLARY BACKEND-FRONTEND-CONVERTER…
function convertToFrontend(item) {
return {
slug: item._id,
type: item.type,
src: item.image ? item.image.imageInfo : item.video.videoInfo,
description: item.description,
title: item.title,
link: item.link ? item.link.url : undefined
}
}
Without this CONVERTER-FUNCTION you will get an ERROR on FRONTEND.
c) Now use this 2 functions on your FRONTEND, sending either the ProGallary-ID directly to BACKEND, or get a list of ProGallarary-IDs on backend, sending them back to FRONTEND —> for example filling a DropDown with all existing Pro-Gallary-IDs —> giving you the possibility to CHOOSE the right ProGallay directly from a DropDown-Menu on your page.
d) Once you selected one of ProGallary-IDs —> sending it again to BACKEND.
The Backend-Functions will retrieve the correct ProGallary-Data → converting it and sending back to FRONTEND.
e) Now you have the data from your selected ProGallary inside an Object…
Which will look something like…
f) continue what to do now with all that data…
g) generate your …
search for images in Pro Gallery
…FUNCTION!!!
Very easy to do, will take you just some weeks!
!!! Good luck and happy coding !!!
!!! May the CODING POWER be with you !!!