Published:
December 03, 2011How to get symfony project base url in template file
To get the base url of your symfony project , you can use the below in your template file.
$sf_request->getUriPrefix().$sf_request->getRelativeUrlRoot()
And to get your current app URL.
$sf_request->getUriPrefix().$sf_request->getRelativeUrlRoot().$sf_request->getPathInfoPrefix();