Workflow to load information from SLUG

Hello everyone…

I’m trying to read the URL from Get data from URL selecting the Path segment as list (Get data from page URL:item #2).
On the Page Load, I set a statement to put the item from the URL to the custom state.

So far so good. Everything works fine.

Then I want to use the value from the custom state to Do a search for
But It doesn’t read it because the custom state is a text type. If I change it to the Datatype, it doesn’t read the Slug it from the URL.

What workflow should I use to load information from the SLUG?

Thanks in advance
Fabian

I think this might be the solution:

I have read it. But I didn’t get it :slightly_frowning_face:

Isn’t that just the same as getting the page’s ‘thing’?

Or at least just getting data from the URL path?

What are you trying to do, and why does it need all those extra steps of setting custom states and doing searches etc?

can’t you just use the current page’s thing?

2 Likes

@adamhholmes beats me again: If a page has a type and you’re on a page of that type, the page’s thing (if provided) is just that: Page's thing

So the slug (regardless of whether we navigated to the page using the slug or the unique ID) is just Page's thing's slug

Using slugs: Using Page Slugs - Bubble Docs

… and of course, you don’t actually care about the slug, you care about the thing… which you already have. @fabian.banushi you would very much benefit from doing the Bubble lessons and at least watching the Bubble Crash Course videos as your questions indicate that you do not have a grasp on Bubble fundamentals: Academy | Bubble

2 Likes

What are you trying to do, and why does it need all those extra steps of setting custom states and doing searches etc?

First, to prove that I have set properly the Get data from URL
and then since the Get data from URL it didn’t work I thought to use custom state

can’t you just use the current page’s thing?

Yeah, I did… it doesn’t show the information… I guess it works only with the user-type thing (because I’m currently using it with profile page)

I found out why it doesn’t work… (I guess)

I had set the Slug Tittle + unique id… (because so I wanted it)
If I remove the ID it works.
Now I have to generate a unique number… Because will be many tittle with the same letters… and I thought to use the “article” ID.

First, to prove that I have set properly the Get data from URL
and then since the Get data from URL it didn’t work I thought to use custom state

You almost certainly don’t need to use Get Data From URL here (and if you do, you don’t need to segment the paths as a list)…

Although I don’t actually know what you’re trying to do - so maybe you do need to use Get Data From URL - but you certainly don’t need to segment the path as a list, as the second item in that list is the one that comes after the page name, and the one that Bubble will read anyway using the regular Get Path From URL.

If it’s not working, then you’re clearly doing something wrong…

Yeah, I did… it doesn’t show the information… I guess it works only with the user-type thing (because I’m currently using it with profile page)

It works with any datatype, and is very simple to do…

Again, it sounds like you’re overcomplicating a very simple thing here…

yeah… I found why it doesn’t work…

Thanks

I wish bubble would implement the feature of using get data from url and when selecting the type of data to recognize the slug and not just the unique ID…it’s wishful thinking at this point as they seem busy implementing new features for URLs that already had a working solution rather than adding new features that would enable functionality that doesn’t exist yet.

2 Likes

This topic was automatically closed after 70 days. New replies are no longer allowed.