Adjusting URL to display a category

Hello fellow Bubblers!

First off, my research skills might be bad so I am sorry if this topic is already around. If so, please feel free to just send me in that direction!

I am wanting to find the best way to adjust the URL so it displays a dataset with a sub-set/option set after it. Building a site that has categories for different things like fashion, tech, entertainment, etc.

Here is an example of the URL I’d like to have:

“Category” is currently a Data Type
“Fashion” would be a Data Type or Option Set (whichever is best).

Items on my site will be categorized when they are created.

Many thanks!

IF the page type is category, then set the slug of the category as the name “fashion” and then you need to send the datatype to the page in order for this to work.

IF NOT,
Simplest way to do this in bubble is using a url parameter which means the URL will appear as:

example.com/category?c=fashion

c = category in this case

If you want pretty URL’s, you will need to use Javascript or a plugin and maintain that across the app.

you can not use a page content type if this is the URL structure you want, because to make this structure work, you need to have a page name of ‘category’ which is supposed to be dynamic as it is a Data Type. Bubble would make it possible if you do ‘example.com/index/category/fashion’ where both Category and Fashion could be dynamic coming from data types.

Alternatively, you could create a page with a name like c and use ‘example.com/c/category/fashion’ where category and fashion again can be dynamic.

The navigation uses go to page with data to send as text being the /category/fashion portion…any data extraction from URL uses path segments as a list.

Thank you for the info!

I haven’t worked with URLs in bubble before so I might be asking silly questions.

The page name is “Offers”, and the purpose is to have this one page pull data based on the category you click in the Header (IE: Tech, Fashion, Entertainment, etc…). Right now the “type of content” is set to “Category” as it is a Data Type. The ultimate goal is to make it say “www.example.com/offers/[Category]” ([Category] being tech or fashion or what).

Mainly confused on how to make [Category] display the category of offers that are being displayed.

Hope that makes sense!

With the setup you explain now, you can set page content type to Category. Then make sure all categories have a slug value. Then when filter the search reference current page category as filter value

I appreciate the help!

Last question - I hope - how does one doe Filter The Search to make it filter that specific category chosen.

Also, this is how it’s setup:

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