Hi,

The nature of the development approach that I use is that paths to
resources (images, CSS and JS files, etc.) relative to the template files
during design time are different from those during run time. (I have
templates in a separate folder, but my web app runs as index.php in the
root folder.)

I like to see preview of a page I work on in Design view of Expression Web
or Dreamweaver, and so in order to have images, etc. point to proper paths
during design time and also during run time, I do something like this in my
templates:

<img tal:attributes="src string:${resourcesDir}/shared/images/menu_bar.jpg"
src="../../resources/shared/images/menu_bar.jpg" />

This increases workload, makes code less readable, and is error prone
during modifications.

How do you, guys, deal with this issue, if you do? Maybe there's a trick
that I haven't thought of. I've tried using <base> element, but Dreamweaver
ignores it, and Expression Web messes up my code. By the way, this problem
isn't limited to those who use PHPTAL but, apparently, is also shared by
some of those who Code Igniter (and, I am sure, other frameworks that
require a structure of folders):
http://codeigniter.com/forums/viewthread/94591/#478998

Roman
_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to