Get base URL and current URL in the template file in Magento 2 Home » Get base URL and current URL in the template file in Magento 2 Posted on June 28, 2019 AdminLatest In 270 Get base URL and current URL in the template file in Magento 2 $block->getUrl(‘hello/test’); $block->getBaseUrl();