1

I want to add the login page geturl link when I click on the login link. What is the role of customer_account_login.xml in this and how to load the login page after clicking on the link?

  • 1
    Welcome to Magento SE. As it stands, the question is hard to read and understand. Please update the question with more details what you want to achieve and at least proofread it once. What's a "grturl"? – Fabian Schmengler Aug 22 '16 at 6:28
3

You can do like this:

Put this line <?php echo $block->getUrl('customer/account/login') ?> in anchor tag href and try.

  • i put this but this load vendor path login.phtml file i want to load my theme login.phtml file – Devendra Aug 22 '16 at 6:15
  • This is my code its working. <a href="<?php echo $block->getUrl('customer/account/login') ?>" title="<?php echo __('Login') ?>"><?php echo __('Login') ?></a> – Ravi Thanki Aug 22 '16 at 6:41
1
$objectManager  = \Magento\Framework\App\ObjectManager::getInstance();
$storeManager= $objectManager->get('\Magento\Store\Model\StoreManagerInterface');
$url        = $storeManager->getStore()->getUrl('customer/account/login');
  • i want to load my theme login.phtml file when i click on login link that i set on home page? – Devendra Aug 22 '16 at 6:23
  • Try first with manual login url like:: www.yourdomain.com/index.php/customer/account/login and check is it working or not. – Ashish Jagnani Aug 22 '16 at 6:26
  • Please don't advice people to use the object manager directly : magento.stackexchange.com/q/117098/2380 – Raphael at Digital Pianism Aug 22 '16 at 8:42

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.