Can the rendering of a parent node be changed from its children?

Hi there,

I know that I can change child nodes passing down properties. And I also know that I can get a parent node by using parentsUntil or closest for example. But, can I change the rendering behaviour of the parent node then?

Say for example I have a grid. Once I place a teaser element in this grid, I want to change the grid’s behaviour.

Is that possible or going against best practice?

Regards, Jan

Hi Jan,
very simple answer: No, that’s not possible. A Fusion object does not have access to its parent objects’ data, so you can’t change its behaviour. What you can do of course is make the Grid object check if there’s a child of type Teaser somewhere, and render differently in that case.

Thanks @beheist. In the end I added a checkbox in the inspector that does the job.