2

I need to get the path of the current page like - /customer/account/ NOT http://magento.dev/customer/account/index/

Any idea how to do it?

3

Within a block, you should be able to use...

<?php echo $block->getRequest()->getRequestUri() ?>

...to return just the path portion of the full current page URL.

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.