Render attribute with list of entity IDs as stack of entity (or other) cards

Hey,

I’m really tormenting myself here but can’t come up with a decent solution. Would appreciate some nudge in the right direction.

In general I want to render a stack of cards based on the attribute of the entities of a specific domain.

E.g., I have a number of zones, and for each zone I want to render the persons that are in it. So I need a stack of cards for the zones where each card contains another stack of cards with type ‘person’ (or something similar).

I suppose in the case of my zones/persons example I need to somehow nest two loops, the outer iterating over the zones, the inner iterating over each person in the corresponding zone. The outer renders a stack of cards for each zone, while the inner renders an ‘entity’ or ‘person’ card or something like that for each person (resp. entity, in general).

I might have other nested lists similar to zone.persons → person entity that I want to render that way, so please do not specialize too much on the persons per zone use case.

I’ve already tried mushroom template card, auto-entities and several others that felt promising, none of which really did the trick.

Do you have an idea of how to achieve this? I would really appreciate it.

Thanks

Try this great card by @thomasloven

Thanks, I’ve already tried that card. I haven’t really gotten far with it. I think I would need too nest two of it, one for the zones, filtering on zones with state > 0 (to exclude empty zones) and a sub-level with persons of the current zone, which I do not know how to reference in the sub-card. It also somehow isn’t very talkative when I do something wrong… In most cases I’m only seeing a red exclamation mark. And the tutorials and docs seem to be outdated.