1

How i find this file and i want to add some fields here

 <?php echo $block->getChildHtml('customer_form_register_layout3');?>

i search in

app/design/theme/childtheme/custom module 

but not found here

how to find $block->getChildHtml('Cusomer_form_register_layyout3')

and what is getChildHtml()

  • search in respective modules layout folder.. – aravind Feb 26 at 11:17
  • in app/code or app/design ... – prabhakaran7 Feb 26 at 11:20
  • <referenceBlock name="landingPagelayout3"> <block class="Magento\Customer\Block\Form\Register" name="customer_form_register_layout3" template="form/register.phtml"> <container name="form.additional.info.layout3" as="form_additional_info"/> <container name="customer.form.register.fields.before" as="form_fields_before" label="Form Fields Before" htmlTag="div" htmlClass="customer-form-before"/> </block> i found i app/code – prabhakaran7 Feb 26 at 11:21
  • I think it's your custom module.so You need to search in app/Code , then if you need to override that xml you have to overwrite it in app/design.. – aravind Feb 26 at 11:26
  • can i copy that xml to child theme – prabhakaran7 Feb 26 at 11:27
2
$block->getChildHtml('Cusomer_form_register_layyout3')
  • This is nothing but name of block which exist in layout file so you can search in layout(either in your module or design section).

  • $block->getChildHtml() used to fetch the content of phtml assigned with respective block name.

  • Here is detail description to add one extra tab in product detail page:

https://www.cloudways.com/blog/add-custom-tab-product-page-magento-2/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.