Magento Expert Forum - Improve your Magento experience

Results 1 to 2 of 2

How to Get Current URL in Magento 2

  1. #1
    Junior Member
    Join Date
    Aug 2022
    Posts
    64
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to Get Current URL in Magento 2

    Magento 2 is an adaptable and include rich Internet business stage with a wide range of functionalities that permits redoing your web-based store according to the business prerequisites!
    Name:  How-to-Get-Current-URL-in-Magento-2-Social-Share.png
Views: 868
Size:  23.0 KB
    Tweaking the administrator board and frontend is effectively conceivable utilizing various strategies. While running a web-based store, there might be a framework prerequisite to Get Current URL Magento 2.

    Works with administrator by making their work more straightforward as they don't need to find and type URLs while fostering a page or joining the URLs anyplace

    For more info: https://meetanshi.com/blog/get-current-url-in-magento-2/

    View more threads in the same category:


  2. #2
    Junior Member
    Join Date
    Sep 2018
    Location
    Oman, Muscat
    Posts
    2,084
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Default

    Assuming you really want to get current URL in Magento 2 PHTML record the simplest method for doing this is to utilize the accompanying code: $currentUrl = $block->getUrl('*/*/*', ['_current' => valid, '_use_rewrite' => true]); This is the best technique since you don't have to utilize the Article Supervisor.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •