Re: [SMARTY] way to get current URL
| From: | Monte Ohrt | Date: | Fri, 31 Dec 2004 18:04:18 +0000 |
| Subject: | Re: [SMARTY] way to get current URL | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-12087@lists.php.net to get a copy of this message | ||
You could assign it how you like:
$smarty->assign('url', 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']);
or access server vars directly:
{$smarty.server.REQUEST_URI}
generic@SAFe-mail.net wrote:
Hello--I would like to be able to get the current URL from within a Smarty template. I have looked at the reserved variables, but the {$smarty.get.page} and {$smarty.post.page} aren't what I need since a form has not been posted, only a php page executed. Any help will be greatly appreciated.