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?
(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.
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?
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).
Or run an API workflow in “bulk” from Data > App Data so that you control timing and which records are updated a little more.
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.