Can any one tell me how to call customer login page in magento2 Logo.phtml

  • Let me know if you have any issue. Jul 24, 2017 at 9:18

1 Answer 1


Get login page in any phtml file:

<?php echo $this->getLayout()->createBlock("Magento\Customer\Block\Form\Login")->setTemplate("Magento_Customer::form/login.phtml")->toHtml();?>

Flush cache and try

  • please check it totally outside in page
    – Monu Kumar
    Jul 24, 2017 at 9:19
  • @MonuKumar, The question is about how you call login page in logo.phtml. and this is the method to call login page in logo.phtml or any other phtml files. next you need to set design for it. Jul 24, 2017 at 9:21
  • i want to call default sin in or create link in logo.phtml
    – Monu Kumar
    Jul 24, 2017 at 9:46

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.