Slugs In Single Page Apps

I’m trying to wrap my head around something, but I’m confusing myself…

I have a single-page app already set up.

On the home page (reusable element), I have listings of apartments in a repeating group.

When a user clicks an apartment card, they go to the full listing (reusable element),

To do this, I use URL parameters:

On the page it’s going to (reusable element), I have the data source set as ‘get data from page url’.

I want to switch to slugs to make the URL look better, and also for sharing.

I’m having problems setting this up.

I’ve read through the forum and looked up some videos. Most tell how to create a slug…I’ve got that down.

I also know how to send the slug to the full page, but I can’t figure out how to populate the page now. The slug shows, but there isn’t any content.

AI says I need to do a search for on the full page. This seems like a lot of WUs that aren’t required.

Am I missing something here?

What is the proper way to do this?

Thankyou

I try to avoid slugs too in SPAs but if it’s absolutely necessary, you can use the get data from page URL (path segments as list) and then use the do a search for param (for ex: if you’re passing the unique ID, you can do a search for with the filter set to unique id = get data from page url item:#1 or 2 etc.)

1 Like

Thanks!

On this app, the extra search just to set a slug isn’t a big deal because it’s just our property management app.

But on my other app, I wanted to do the same thing. I’m just not sure the extra search that would probably add a lot of work units would be worth it.

Thanks for your feedback

1 Like