I want to create a component to view dynamic data coming from two different collections on two different pages

Hi,
Let me explain with an example.
I want to create a component to show a list of cars on example.com/cars page. Now I want to use that same component(instance of component) on example.com/bikes page to show a list of bikes.

What I’ve done so far : Created a component and using it on both the pages.

Problem I’m facing : When I connect the source and populate content using divhunt variables on one page. It shows same items on both the pages.

@jatin

It’s not possible to have 2 different sources on same component sadly, it’s only built to work for text and attributes.

So my suggestion would be to build component only as card for cars and bikes, like a box, then call source on component holder where you call/insert component, and not inside the component element.

Hopefully this makes sense?

1 Like

Thanks for the quick reply @dejan
That worked!
One more question : Will highly appreciate your suggestion on why am I getting this output when trying to present data stored as rich text?
image

@jatin

Are you using Rich Text element/tag type?

1 Like

Oh my god! I feel so dumb now.
Thanks for this. :slight_smile:

I will post more queries in future as and when needed now that I know I’ll get superfast responce.

@jatin

It’s hard to know everything especially since we don’t have proper documentation, so feel free to reach out. Also always first try to search for a solution in case you can find it quicker :smiley: