When I tried to call url helper in a view file like below:
$url = $this->url();
The result is if:
- At current the controller is
indexand action isindex. With index is default action key, it will be only out:
[base_url]\[module] - At current the controller is not
indexand action is no tindexit will only out:
[base_url]\[module]\[controller]\action
But I want the link in 1st case is:
[base_url]\[module]\index\index
How can I get it?
If you pass a param to url helper you will retrive a full url for 1st case.
For example:
in index.phtml
It will print out:
The you can get index action, and you’ve just ignore the
/test/testOutput: