Search code examples
smarty

How can I get current URL using smarty


How to get URL using Smarty similar to window.location in JavaScript ?

I did this

{$smarty.server.PHP_SELF} 

but it's not working.


Solution

  • You can use this, too.

    {$smarty.server.HTTP_HOST}{$smarty.server.REQUEST_URI}