Hi all, On a dynamic page I am trying to create a link to someone's Facebook page. I've uploaded a photo of the Facebook Logo and now want to link it to a URL in a database. Does anyone know how to do this or can anyone point me in the right direction in terms of the coding? Should be fairly simple but I am by no way experienced at this!| Thanks
top of page
Important forum update
This forum is migrating to one unified Wix community forum starting July 26th, and will be read-only during the process.
![feature fixed.png](https://static.wixstatic.com/media/3bfa8a_f845e1016b8a49758acdd6edd6610c3b~mv2.png/v1/crop/x_0,y_2,w_852,h_508/fill/w_104,h_62,al_c,q_85,usm_0.66_1.00_0.01,enc_auto/feature%20fixed.png)
Wishlist Page is the official platform for requesting new features. You can vote, comment, and track the status of the requested features.
bottom of page
Hi Joe,
I suggest you to add a new filed at your collection that include the URL, so each person at the collection will have a facebook photo and a URL.
At the page site of your dynamic page add an onClick() event handler that run when the user's clicking on the image. At the handler use getCurrentItem() function that returns an object that include the current person's details from the database.
Get from this object the URL field value and navigate to the URL.
for example:
wixLocation.to("result.items[0].urlField");
* Pay attention ,a dataset needs to load its data before you call its getCurrentItem() function. Usually a dataset finishes loading a short time after the page it is on finishes loading. So if you call getCurrentItem() inside the page’s onReady() event handler, the dataset might not be ready yet.
Here you can read more about this function.
Best,
Sapir