Modal in Component


How do you interact with modal within the component?

In the link action open the modal, it works if I use the modal id but then it will keep opening the same modal when I have multiple instances of the component on the page.

If I use an ID setting on the component and connect it to the modal, I don’t understand how to connect the action link to the modal, there is nothing I can find in the dynamic content.

I imagine it is possible, I just don’t understand yet how to do it.

What I am looking for is an image that, once clicked opens enlarged in a modal with its caption on the left. So the modal uses the settings of the component it is in.

I can make it work for one, but not relatively, allowing to have multiple instances of that component on a same page.

Thank you in advance for your help


I finally found what I was missing

So in the component
add a property ID, give it a name of your choice and set auto-generate on

Then on your modal located in your component, connect the ID to the ID property you created

Then in the link triggering your modal, as Block ID click on the component link (if you are starting from a static link you created before, make sure to delete first the ID, the component link will appear once the field cleared, that is where my problem came from I believe) and select your ID property.

It works like a charm and is so, so, so, wonderful and powerful! Thank you Cwicly team!!