How to render a component from Reference field in model

I’m feeling dumb here but I have a Product model with a reference attribute to another component model Frame.

I’m trying to render the Frame view from the association but can’t seem to figure out how.

The Frame component renders an absolute positioned div (different frames for some products)

/* works great */
<BuilderComponent model="product" content={page} options={{ includeRefs: true }} />
/* Like this? */
<BuilderComponent model="frame" content={?} />
/* Or this? */
<BuilderContent model="frame" content={?}>
  {content => <Frame attributes={?} image={content?.image} />}
</BuilderContent>

Figured it out. For future reference:

<div>
  <BuilderComponent model="product" content={page} options={{ includeRefs: true }} />
  <BuilderComponent model="frame" content={page.data.frame.value} />
</div>
1 Like

@beamercola, that’s great to hear! Yes, you should be able to access all fields in your model entry in the model.data object.

Please let us know if you have any other questions.