I have a node content hierarchy of Chain (parent) and Property (child), related by an entity reference (ER) on the Property back to Chain.
Each of these node types has an ER to a Skin (custom entity) - these Skins furthermore contain ERs to Slides (another custom entity) but I don't think that's important right now (Shirley!) This is all held together with Inline Entity Form.
I have a situation that I can't work out after many attempts. There is a multi-value field on the Property create page:
- Make a new Skin (use the IEF on this page)
- Use the parent values (use the Chain's skin)
- Use fallback mechanism (where Property has no value set, use the Chain value)
This means I need to either:
- process & inject the Chain's Skin into the Property's Skin template as an additional variable, and perform the either/ors in there based on the multi-value
- preprocess the Skin so that the correct values are already present in the template so I can just "go ahead and render" based on the multi-value.
Ideally, I'd like to be able to just use the normal {{ content }} variables in the end template, either way. The first suggestion I tried, but I have got no idea, I've tried lots of things. The second looks like it might work with some sort of hook_entity_view[_alter] or similar, but I have been unable to deduce the correct approach or find a suitable example to copy.