I have a database with columns of artist name, artist photo and FB link (URL), Instagram link, website link. If artist have no FB link the ‘FB link’ column is blank.
I am trying to use repeaters to loop through a database of artists, and for each artist display their name, photo and a social bar for each artist that links to their FB / Insta / website if present in DB.
I have figured out how to loop the name/photos but could not get the social bar to connect to the data in the repeater. Anyone know how this can be done?
Ideally, I would like to have the Facebook (f) icon appear if the FB link exists, the Instagram ([]) icon appears if the Insta link exists, for the artist in the DB. Any gurus out there can help me figure out?
Not sure if the social bar can even be connected to a dataset. I don’ think it is connectable but I am not a guru although I do code in Wix everyday. I could be wrong.
In this case, I would make my own social bar so that I will have full control. After all, a social bar is just a set of images inside a container box.
Thanks Keawe for your speedy reply.
Ok I have given up on reusing the social bar provided (at least until they upgrade it to accept connections to data).
But I am still trying to figure out how to make a button or image [ facebook logo ] appear or not appear depending on if the dataset item (the artist (item)'s FB link column) is blank. I probably have to write some code i think, but this is my first day with wix and I am finding things awfully inflexible so far
Yep. You may need to write code to do this kind of control. Find each item in the collection, and write code to $w(‘#element’).show() or $w(‘#element’).hide().
Haha…I agree that it takes a bit of time to get used to Wix. But with Wix code now, it is very powerful. I used to specialize in React, but find that Wix and Wix Code is 10 times easier to build modern and powerful web app. As long as you know ES6 and used to jQuery, then it should be smooth sailing. Oh, get used to the new Wix data object-like schema (kinda like GraphQL) and forget about the old school SQL. It doesn’t apply here.
Anything comes up, I will try to help. But I am not part of Wix. Therefore if I don’t reply fast, it’s because I am doing something else.
Hi Andrwo,
You can create your own Social Bar by adding images and link them to the relevant page. You can check out the documentation here for that purpose.