Page depending on category

Hello I’m quite new to bubble and I was wondering how I can show a page depending on the category. On my website users can post articles and podcasts to different topics. For those topics I have created categories. Please have a look at the following picture.

I have created a data type called “category”, which has a picture and a name. The name is as you can see on the picture a, b, c, d, e or f. I have also created a data type for articles and one for podcasts. I haven’t linked the category data type with the articles and podcasts data type. I don’t know how to do that. The different categories are shown on the index page. So if a user clicks on the category “a”, he should go to a new page and see all the related articles and podcasts belonging to category “a” as you can see on this picture.

I know that a possible workaround would be to create for each category a page and add a constraint to it. But I don’t want to create six pages in total. I just want one page. Is there a possibilty to create one page with the relevant conditions? Thank you very much for your help :slight_smile:

You need to set the page content type to ‘category’, and then pass the relevant category to the page from whichever workflow you use to send people there.

Then you can just display all articles from within that category on the page.

You’ll need to link the article to the categories first in order for this to work.

If you’re not sure how to do that I suggest having a thorough read through the Bubble manual to see which method of linking data would best suit your use case.

Connecting types with each other - Bubble Manual

Thank you very much for your help! I will try to do it with your tips :slight_smile:

So it worked out, thanks! In case anyone else is having the same issue. I added for my category data type a field “article” with the type “article”. I declared that the “type of content” for the new page is category. For my new page I have also added a constraint for the repeating group saying that the current page category name and the name of the article category should be the same. Then it worked out! :slight_smile:

1 Like