I think the easiest solution would be to have your designers type src="/images/logo.jpg", href="/css/wiw.css", etc. and then put the respective files in the directories
/Users/mysilmaril/Sites/WIW/images /Users/mysilmaril/Sites/WIW/css
(with /Users/mysilmaril/Sites/WIW/ being the webserver's configured document root)
In this case, no additional mapping of path components like /images —> /assets/images would be required (via TT2 [% images %] or whatever).
If you can't get your designers to type anything other than src="/logo.jpg", you could set up a RewriteRule to prepend /assets/images to any URI-path that ends in .jpg, .png, .gif, etc.
P.S.: if you're going to use
[% root = '/Users/mysilmaril/Sites/WIW' images = '$root/assets/images" %] ... <img src="[% images %]/logo.jpg">
I'm pretty sure you don't want the /Users/mysilmaril/Sites/WIW part in there, as the image would then (most likely) be searched under
/Users/mysilmaril/Sites/WIW/Users/mysilmaril/Sites/WIW/assets/images/
In reply to Re^3: Template Toolkit Question
by almut
in thread Template Toolkit Question
by Perobl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |