Apologies if this has been asked:
I am attempting to create a simple food ordering app where a user scans a QR code. The URL assigned to the barcode might be something like www.domain.com/?restaurant=kfc
I can pull the KFC and display it on screen, that part works. But what I cant figure out is how to link the parameter to the restaurant name in the database
Ive attached an image below of what I am trying to do, which doesnt seem to show anything on screen. I was using ‘Do a search for’, but I just want a direct connection to the entire database row for KFC
Any help or guidance is appreciated. Im new, and have this feeling im missing something really simple, or that im just not picked up the logic around how it all works yet
Instead of using a parameter set the page data type to “restaurant”
Have the set slug action on your creation of the restaurant. Slug being the name.
Now URL will look like
Domain.com/resturauntSlug
No params needed.
1 Like
Appreciate the reply,
I have made an attempt at what you mentioned, but must have missed a step. This is what I done:
- On page, I set ‘Type of content’ to Restaurant
- Added a slug in data table called hench1
- Added text field to page and set source to ‘Current page restaurant’s name’
Outcome: 404 Error
I figure I am managing the slug wrong somehow. The URL I am trying to now access since adding the slug to the data table is www.domain.com/hench1
Thanks for you time, and hope to hear back soon
I have just tried the following URL: domain.com/index/hench1
It loads, but no text fields are populating
That’s because text fields now need to be based off of “current page resturaunt” Not the parameter.
Thanks - Ye in my other reply I mentioned I have changed it to current page restaurant.
Run in debug mode, verify current page returns the desired object. Verify slug on the page as well
Thats interesting (still learning how to debug etc in Bubble)
It works in debug, but I was testing it in live where is does come back blank
SOLUTION - Turns out I really am a rookie. When I was running it live there was no data in the table to show any results, doh!
1 Like
golden glad you got it. Btw you shouldn’t need /index either, should just be domain.com/slug If versioning and data is right.