How do you echo out current URL in Cake’s view?
Advertisement
Answer
You can do either
From a view file:
<?php echo $this->request->here() ?>">
Which will give you the absolute url from the hostname i.e. /controller/action/params
Or
<?php echo Router::url(null, true) ?>
which should give you the full url with the hostname.