Generally, in Magento 2, .phtml files have $block->getChildHtml()
, allowing us to put extra data in the .phtml by adding a child to the layout.
If some .phtml file don't have such code and we want to put our custom HTML in a specific area, is there an approach to do that? Because overriding the .phtml file in the module will require frequent updates when the original .phtml file is updated.
I am seeking a way to add $block->getChildHtml('custom_block_name')
in the .phtml before it renders.
Is there any way to do that?
(For example, I need to add block phtml under the customer name on the registration page.)