In template I try to get url link but it doesn't work correct. I try to use this code:
But it always return http://abcs.com/aloha/product/view/, Is this a bug?
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.Sign up to join this community
This is the wrong approach. Try following way:
$block->getUrl('aloha/product/view', ['id' => 22])
According to your comment you need url using id. GetUrl will return route/contoller/actionclass and ignore remaining string. In your case, try following way: