I was wondering if there's any way to do something similar to what HtmlHelper does in Cake views: instead of having to write the URL manually, calling some kind of helper to make it for you.
I have taken a look at this post but it is from 2010 and maybe there's something new now...
Currently I have codes like this at my javascript files:
window.location.href = 'http://' + document.domain +'/cakephp/posts/view/'+$(this).attr('data-id'); But if i change the cakephp folder name, or I use another configuration on the server or something similar, the URL changes and I should change manually all the codes with this type of URL.
I wonder if there's something similar to:
echo $this->Html->link('controller' => 'users' , 'action' => 'login');