Problems linking to same Modal window for multiple CMS wrappers

Hi there,

I have a list of artists that brings up a modal window with their biography. I needed to add “featured artists” above this list, but that would open up the same interaction (same modal window). I’m really confused on the best way to handle this, and nothing is even working… I’ve tried a number of things! As it stands, here’s what I’ve done:

  1. Added a “switch” in my Collection for “invited artists”
  2. Created a new Collection Wrapper above the current table, and filtered to show only these 3 invited artists.
  3. The links to open the modal window work just fine for the artists below; but not on the 3 artists above. I tried duplicating the modal window element, and a bunch of other things… nothing is working.

I’m not a Webflow expert, so I’m looking for ideas on the best way to handle this situation? HELP!!

(btw, the page in question is this one: Nos Artistes), and my public share link is here: Public Share

For the record, I did find another thread with a similar issue (preview link), and I’ve literally compared every single item with mine. I’m sure it’s something really small that I’m just not seeing? I can’t figure out why my 3 links above aren’t bringing up the Modal window, while it’s working fine for the others?

I’m literally pulling my hair out! :laughing:

It looks like you’re just about there with the setup, so all you need to do is modify a couple of things to get this working as expected :slight_smile:

  1. Update your interaction to affect the Modal Window class (instead of the selected object) and make sure it’s looking for only siblings with that class:

  1. Now that the interaction is more reusable, make sure the structure of your featured artists has the Modal Window class at the same level as your trigger element (this makes it a sibling, which is how the interaction was setup in the first step):

image

With those two changes both your featured artists and the list of artists below will trigger the correct modal :tada:

One thing to note: it looks like your Close Modal interaction is setting your Modal Window to display: block right before hiding it, so I’d recommend removing that step so all it does is hide the element:

That should get things working for you but don’t hesitate to reach out if you run into any issues :+1:

OMG!! I don’t know you personally, but I love you! :hugs: Thank you so very much, my eyes were literally crossing from staring at this for hours and trying a ton of options! You literally just made my day… THANK YOU!!! :face_holding_back_tears:

1 Like