Can I add slugs to a reusable popup's URL?

I currently have posts displayed in a repeating group. When a user clicks on a post’s image it goes into a popup so they can see the image full screen and more detail about the post. I am wondering if I can take that post’s slug and add it to the URL so that users can share the URL and have external users open the link directly to that post expanded.

Another note is I want to use a popup not another page so users can get more details about a post without leaving the repeating groups list.

Thank you!

Sure… just add the slug to the URL path or as a query parameter…

Then add a conditional workflow on page load to open the popup and display the correct data.

I am not sure if I am doing this right since I haven’t changed the URL path or used query parameters before but right now I have this happening when a post is clicked:

This is successfully changing the url, but when I copy that URL and paste it, it’s going to the index page but the popup is not showing. Also, when I close the popup the url is staying the same.

Well have you set up the required workflows to show the popup and display the correct data in it?

Yeah, so step 1 in that flow above shows the popup, then step two brings in the data from the selected item in the repeating group.

In this image you can see the modal pops up with the slug added to the end of the URL.

But when I copy that url and paste it, it just lands on my index page and the popup isn’t shown:

As I already asked… have you set up the required workflows on pageload for this (I’m guessing you haven’t, in which case that’s what you need to do).

(you don’t need to do a redirect when the Image is clicked)

Also, although slugs might look nicer, you’ll be better off using the unique ID if you’re going to use query parameters, as Bubble only recognises the slug when it’s in the URL path, not a query parameter, so there is less work involved in retrieving it.

1 Like

I see what you mean now, thank you! I got it to work after some trial and error.

Also, I made the switch to unique ID’s, thanks for the advice!

1 Like