RE: [SMARTY] Paths in templates
| From: | Ferdinand Beyer | Date: | Mon, 03 Feb 2003 16:37:19 +0000 |
| Subject: | RE: [SMARTY] Paths in templates | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-7478@lists.php.net to get a copy of this message | ||
On 3 Feb 2003 at 17:41, SavaJr wrote:
> On unix you can also make symlinks in templates dir, to original dirs.
> Like
>
> Templates
> - img -> ../img/
>
> It helps while developing
Im my experience it is the best practice to use absolute uris like
/images or /index.php. I usually define a constant with the
ROOT_URI during development so that my apps can be run in a sub
directory - e.g. /projects/xyz/. In production I simply set this
ROOT_URI to /.
For Smarty I assign an array with uris for important directorys like the
root or the images directory:
<a href="{$URIs.root}"><img src="{$URIs.images}home.gif"
/></a>
HTH
--
Ferdinand Beyer
<fbeyer@clickhand.de>