datocms / plugins

Repository providing samples using the Plugins SDK
MIT License
33 stars 47 forks source link

[Web Previews] Can't get Parent content and model id when opening preview in a child (Referenced Model content) #98

Open adeel-bright opened 1 year ago

adeel-bright commented 1 year ago

I have model A which represents a page and i have a field in model "A" which reference to model "B". I want to edit record B from record A and want to preview that as well. I am able to get the ctx value of record B in preview modal, is there any way i can get the value of parent model i.e model A in the similar iframe.

Any help will be appreciated. Thanks

marcelofinamorvieira commented 1 year ago

Hello @adeel-bright i just replied to you right here: https://community.datocms.com/t/access-parent-id-in-a-linked-record/4406/2