[SOLVED] Passing properties/variables among Fusion Prototypes

Hi guys,
I’m struggling with some complex fusion implementation, at least to me, and for sure I am missing something here. May I ask your help to find out what am I doing wrong?

I got a custom prototype that should make some transformations and then render properties from a node, like this:

prototype(My.CustomPackage:Prototype) < prototype(Neos.Fusion:RawArray){

    title = ${q(q(q(node).property(this.offer)).find('topoffer').children().get(0)).property('title')}
    banner = ${q(q(q(node).property(this.offer)).find('topoffer').children().get(0)).property('banner')}
    teaser = ${q(q(node).property(this.offer)).property('teaser')}

   @context.percentage = ${q(q(q(node).property(this.offer)).find('topoffer').children().get(0)).property('discount')}
discount = Neos.Fusion:Tag{
    tagName = 'span'
    attributes{
        class = 'discount'
    }
    content = Neos.Fusion:Value{
        value = ${percentage + '%'}
    }
    @if.hasDiscount = ${String.toInteger(percentage)  > 0 ? true : false}
}

    @context.offerNode = ${q(q(q(node).property(this.offer)).find('topoffer').children().get(0))}
    subscribe = My.CustomPackage:AnotherPrototype{
        node = ${offerNode}
    }
}

I can’t understand why @context.percentage pass the value of the FlowQuery to the Neos.Fusion:Tag but the @context.offerNode does not. The FlowQuery should be correct as the initial properties (title, banner, …) work correctly. The AnotherPrototype seems to work correctly with an input node, at least in another similar implementation.

How should I pass the node resulting from the FlowQuery to AnotherPrototype for further operations?

Thanks,
Nicola

Ok so even if it’s still confusing me I guess I found the solution.
It seems that to pass node to another prototype you need context, therefore:

This does not work:

subscribe = My.CustomPackage:AnotherPrototype{
    node = ${offerNode}
}

This works instead:

subscribe = My.CustomPackage:AnotherPrototype{
    @context.node = ${offerNode}
}

Hope helps someone else.

Bests,
Nicola