I have a scenario such that the childhtml should be called in two different places of same parent template file and for each childhtml is called it should return a phtml which contains the variable getType should be changed.
How is there
------section1------
$block->getChildBlock('demoPage')->setSection('section1');
echo $block->getChildHtml('demoPage');
------section2------
$block->getChildBlock('demoPage')->setSection('section2');
echo $block->getChildHtml('demoPage');
In child phtml
echo $this->getSection();
The above one is the situation can anyone help this out.