How to manage Xblock and multiple children xblock


I’m new to OpenEdx and I’m working on XBlocks development. In my project I have one xblock and multiple children xblock.
how to manage the children xblock in order to call them, sould I use a xml file and declare them in file like this :

xml file:

<second-block></second-block> file

        'first-block = myxblock.first:FirstBlock',
        'second-block = myxblock.second:SecondBlock',
                'xblock.v1': BLOCKS,

but the problem is my js file isn’t execute in this case, Also the method with @XBlock.json_handler related with js isn’t called any more . What I should I do.
What shoud contain my parent xblock.
Thanks for your help

Hi, I’m not sure exactly what you’re trying to do but I recommend you play around with Problem Builder in Studio and look at its code - it is an example of an XBlock that uses various child XBlocks.

1 Like