I want to show two types of things in a repeating group

Hi,

I’m building an app on bubble that has a main newsfeed page with a scrolling repeating group. But I want the repeating group to display slightly different cell design depending on the type of content that’s in there.

Is there a way to do this? Is this custom states?

I have two types of posts (photo & product). If there’s a way to have a repeating group search for two different data types I could do that. But if not, I could also have them be of the same data type (i.e. post) and have a field like “isProduct” and if that’s “yes” it could display a different type of cell? But how would I do that/does that idea make sense & work?

Thanks so much

Make sure your page has some way to identify what type of page it’s on via URL or workflows.

When you add the filter, just make a condition in the same repeating group for when the page is on a particular state or URL to change the filter.

Hey, thanks for the answer.

But I’m still pretty confused. It’s a native app so I’m using only groups no pages.

And I don’t know how to even make the filter for a particular state so that’s what im asking.

Thanks

The “isProduct” idea is the way to go. Then your repeating group can stay one data type “Post”

Inside the cell of the repeating group just set up two groups, both not visible on page load. Then set up a conditional on one with the condition "When current cell’s Post’s isProduct is yes with the property “This element is visible” checked to yes.

Then the other group is the exact same but the condition is When current cell’s post’s isProduct is “no”

Then just design the layout as you want for each group inside the cell.

1 Like

Also if you think you might have more than just Photo and Product and want to future-proof this, you can create an option set instead with the options Photo, Product, then change the logic in the conditionals to look for the option instead of just “isProduct”. Then later if there’s a new post type called Bid (like an eBay bid listing or something) you could just add the new option and create another one of those groups to show only when the current cell’s Type is “Bid”

1 Like

Awesome thanks so much! Super helpful

1 Like

Yea no problem. Also the groups inside the cell will need the data type “Post” just like the repeating groups type, and their data source should be Current cell’s Post. Then any text fields, pictures, etc inside those groups data source would be “Parent groups Post”

Yeah hahaha I had to learn this one the hard way when a couple hours ago when I was wondering why my data wasn’t showing through! But I got there, thanks!