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?
Asked
Active
Viewed 6,048 times
1
Ashish Jagnani
- 6,266
- 7
- 33
- 70
Devendra
- 74
- 1
- 8
-
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 Schmengler Aug 22 '16 at 06:28
2 Answers
4
You can do like this:
Put this line <?php echo $block->getUrl('customer/account/login') ?> in anchor tag href and try.
Mohit Kumar Arora
- 9,951
- 7
- 27
- 55
Ravi Thanki
- 426
- 4
- 13
-
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 06:15
-
1
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$storeManager= $objectManager->get('\Magento\Store\Model\StoreManagerInterface');
$url = $storeManager->getStore()->getUrl('customer/account/login');
Khoa TruongDinh
- 32,054
- 11
- 88
- 155
Ashish Jagnani
- 6,266
- 7
- 33
- 70
-
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 06: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 06:26
-
Please don't advice people to use the object manager directly : http://magento.stackexchange.com/q/117098/2380 – Raphael at Digital Pianism Aug 22 '16 at 08:42