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?
-
1Welcome 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 SchmenglerAug 22, 2016 at 6:28
2 Answers
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– DevendraAug 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
$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?– DevendraAug 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