Interacting with modals / dynamic modal content based on user interaction

Maybe a newbie question:

I am thinking of achieving something where I could query and filter through a custom post type and then open the content of that post once clicked on its excerpt within a modal so I could return to the search I left easily.

Something a bit like this with more filter controls:

Is there a way to achieve this easily with Cwicly? How can I retrieve arguments within the modal?
I guess it is more a js question, would be great if we could load dynamic modals based on previous user’s interactions.

If someone has been working on such project, would love to learn how to achieve it.

Thank you in advance!

1 Like

Hi @JuGa,

Currently this isn’t possible. But!

Dynamic content loading is what the filtering implementation is all about, so you’re spot on.
While most of the logic is in place, all we need to put in place is the action that tells the modal (but really any element) that you want to query x post item.


So I imagine it is coming :crossed_fingers:
it is also basically what the lightbox is already doing with attachments, right?

Do you have plans to put this in place soon?

thank you for quick response @Louis

This is a very interesting topic, thanks for creating @JuGa.

Can’t imagine how powerful such functionality will be, especially when it’s not limited to only a few specific blocks.

Currently, I’m going with the iframe route in combination with dynamic attributes, which comes with tons of downsides, but can’t see any other appropriate option to achieve similar functionality.

1 Like

Should we add this in the Request features section? Not quite sure how to express it through…
Yes that would be great indeed and would offer so many possiblities…

1 Like

Yeah, sure. Why not changing it to a feature request?
Maybe this is an appropriate title:

I fully agree with you. That would open an entire new door of possibilities.

1 Like

Dynamic content loading is what I was thinking,
obviously @Louis Louis knows and has some ideas about it
put putting it into requests, will allow for voting etc…

You could edit the title and category or open a new thread, it’s totally up to you, I guess :sunglasses:

1 Like

oups just opened a new thread with a link to this one, would have been nicer maybe to edit the category indeed (which I did in the past but forgot right now ahahaha).
Thanks for the suggestion!!