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

<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):

PHPTAL mailing list

Reply via email to