I have been trying to create a rich data model that has strong hierarchies -- let's say that a "Team" has "Members" -- both are pieces. I have succeeded in creating the joins, and the _members object is available to the Team. However, I would like to automatically display those members in a widget on the Show page of the Team. Inside show.html (a from team-pages, extended from apostrophe-pieces-pages), I would like to do something like:
apos.singleton(data.piece, 'members', 'members-widgets', data.piece._members)
I know the members widget works properly -- I can include it in other areas and update it as a normal pieces widget.
I have been unable to figure out a way to automatically include the members objects that I already have. I've tried several different ways, and have not figured out a way that works. Is this possible? Am I going about this entirely the wrong way?