Unique Path URL for Shareable cart

Hey all!

I have a Reusable element that’s set up like a shareable shopping cart. That shows the user’s build. I have a custom data type Build and BuildURL. BuildURL calculates a unique random string and adds it to Build.

This all works great. What I’m now trying to do is set when the URL path is a unique string so let’s say domain.com/build/abcd it shows the reusable element and the corresponding build to that element.
verison test

I have gotten it to listtest to show with a full-length unique ID but not with a smaller random string.

Hey @mack2580!

Try using either:

  1. A Slug inside Build data type
  2. A Url Field inside Build data type

If you choose the Slug route, you can use the ‘Slugify (URL Friendly)’ Action
from the Ultimate Toolkit plugin to generate a slug(url) friendly random sting.

Set the Build’s slug to the randomly generated slug.

On your /build/ page select Build as your Type of Content. The green box.

Let’s say the generated slug is abcd.

Then you’d be able to navigate to domain.com/build/abcd
and access the Build through Current Page Build on Data source.

If you don’t want to use Slugs you can achieve the same with an alternate field. Just make sure you selected that field in the Backup field for URL dropdown. The purple box above.

Hope this relates to what you were asking. Let me know @mack2580! :grimacing:

thanks @mcllvz

I have the slug & slugify working generating a unique string. On each build.

I’m still having a bit of an issue with my second problem though. I can’t seem to show a reusable list with a URL path. At least on a condition.

I have now when get path from page URL slug is not empty show listtest a
path type is Build

some when somebody searches domain.com/build it show’s one reusable element
and when somebody searches domain.com/build/abcd it show’s the other reusable element.

I’ve also tried when this URL contains get path URL data but the list shows whether the URL is /build or /build/abcd

Is there any way I can do this for a reusable element. I now have my shareable cart as a reusable element to make quicker and easier to edit This seems to be the only thing that has not worked.

1 Like


Edited to avoid using URL parameters & using Page's Type of content

First, on your Reusable: Shopping Cart

  1. On the ‘page level’
    Set Popup as Type of element
    Set Build as your Type of content for your reusable

  2. Create a new group (turquoise)
    Set Build as your Type of content
    Set Parent group’s Build as your Data source

Add a Reusable: Shopping Cart to your build page

On your Build Page

  1. Set Type of Content as Build
    If you’re using slugs, then you can leave Backup filed for URL Empty
    Slug order – Bubble Manual

  2. In your workflows
    Add an Event, when the page loads
    With Only when, Current Page Build is not empty

  3. Add an Action, of Display data in a group/popup
    Set Element as the shopping cart reusable element
    Set Data to display as Current Page Build

  4. Add another Action to Show an Element
    Set the Element to the shopping cart reusable element

Now you can reference the Parent’s Build source in your Reusable: Shopping Cart

Lmk if that works!