Slug from URL link

Hi everyone, I am following Bubble’s tutorials (YouTube video: Job page: Getting started with Bubble (Lesson 5.7)) and seemed to have missed how to add a slug for the job page when clicking the job link from the search page.

I am aware we can create a workflow to a button and set slug from there. However, how did they do this from a URL link going to the job page?

Link to the youtube video, in the first 5 seconds he demonstrates the slug: https://www.youtube.com/watch?v=RVakUxKJ30s&list=PLoNVJrdvQQYlNiYuZA3Rsi3W3qH_2vPfJ&index=48

Hi @anita25

There are a few important things you need to do.

(1) Set the Job page “Type of Content” to “Job”. Once you do this, Bubble makes it mandatory to send the job when you create a link or a “go to page” action to the Job page.

(2) Data to send. In the Link element (or “Go to page” action), you must enter a value for “Data to Send” (it should show as mandatory). I haven’t done the course, but this should either be “Current Cell’s Job” or “Parent Group’s Job” depending on how you’ve set up the Job search page.

Let me know if that solves it!

Hi Will, thanks for your reply. I believe I should be clearer on what I’m asking.

When I click the Job link, it takes me to that specific Job, however, how is the slug automatically generated?

In the video, it shows the slug appears as bubble-product-developer (company-job title).

I would like to know how to create an automatic slug for each job when I click on the link.

Hope this makes it clearer ! Thank you in advance.

You have to set the slug when the job is created. It doesn’t get created automatically. Best place to do it is in the workflow when job is created and you have a description/name to reference for a custom, human-friendly value. The demo app for the video you referenced has a “company” page with workflows to create and modify a job… you’ll see both have a “set slug” action: bc-workplace-demo | Bubble Editor

Oh yes I see that. However, when we add the jobs directly into the database through a csv upload, the slug is not generated by the workflow. How can this be resolved?

You could:

  1. Set up a data trigger event to set the slug as soon as the record is uploaded. I’d use a condition on the event for when the “before” is empty and the “after” is not empty to only run on new record creation. You may need to add on to the condition though so it doesn’t run if the job is being created manually (in case this conflicts with setting the slug manually).
  2. Or run an API workflow in “bulk” from Data > App Data so that you control timing and which records are updated a little more.
  3. Or if the import isn’t the finalization of the job (i.e. not yet published), then you can set it in a later workflow when it’s set to a public status and confirmed to show up in search results.

Hopefully that helps. There are several points where you can set it. It’ll depend on your specific flows though.

Could you please provide an example for #1 ? OR can you please point out on the demo app where this is?

I am still learning through these Bubble instructional videos and believe the instructor in the video didn’t go through it yet in the beginning of the video he says it is auto-generated.

Here is the demo app from the video:

Here is the video for your reference:

The only way you can set a Slug is with the workflow action of the same name… and you need to do this before you display the link.

Sorry but I don’t understand…

When I upload jobs in the database, how can a slug be created for each job?

In the bubble video they show it’s working and done so there must be a way.

Could someone please show where and how they did this in the video??

I’ve read through this thread and it’s not clear what you are asking.

Try breaking the problem down. Have you been able to use the “Set a Slug” action in any workflow yet?