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
  • 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"? Aug 22, 2016 at 6:28

2 Answers 2

4

You can do like this:

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

2
  • i put this but this load vendor path login.phtml file i want to load my theme login.phtml file
    – Devendra
    Aug 22, 2016 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> Aug 22, 2016 at 6:41
1
$objectManager  = \Magento\Framework\App\ObjectManager::getInstance();
$storeManager= $objectManager->get('\Magento\Store\Model\StoreManagerInterface');
$url        = $storeManager->getStore()->getUrl('customer/account/login');
3
  • i want to load my theme login.phtml file when i click on login link that i set on home page?
    – Devendra
    Aug 22, 2016 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. Aug 22, 2016 at 6:26
  • Please don't advice people to use the object manager directly : magento.stackexchange.com/q/117098/2380 Aug 22, 2016 at 8:42

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.