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()

11
  • search in respective modules layout folder..
    – aravind
    Feb 26, 2019 at 11:17
  • in app/code or app/design ... Feb 26, 2019 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 Feb 26, 2019 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, 2019 at 11:26
  • can i copy that xml to child theme Feb 26, 2019 at 11:27

1 Answer 1

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 and acknowledge that you have read and understand our privacy policy and code of conduct.

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