php - How $block->getChildHtml(); data passes in Magento 2? -


magento default customer.phtml file in directory of magento\module-customer\view\frontend\templates\account has following code in line 42 shows dropdown list when logged in.

<?php echo $block->getchildhtml();?> 

where functionalities declared file?

the getchildhtml() declared @ \magento\core\block\abstrackblock, object $block class extended abstrackblock, function call child block of current block , call tohtml() function, suggest use get_class($block) class name of $block. or find in template xml file defined customer.phtml , find block class name..

read more:

http://devdocs.magento.com/guides/v2.1/frontend-dev-guide/layouts/xml-instructions.html

http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/templates/template-override.html


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -