FastTemplate Directory Help
I have constructed an application that uses FastTemplate, and am looking for a better way to reference the template files. When I define the location of my templates ($tpl = new FastTemplate("/path/to/templates") it seems that in order to maintain links to assets in the template files, like images, I have to include the template files in the same directory from which I am using the template. In other words my template definition must look like $tpl = new FastTemplate(".");
It appears FastTemplate references template files wherever they are specified in "/path/to/templates" but when it gets down to using them they seem to reference the directory where the script gets called from. This isn’t a problem if the template file only contains text, but if your template contains images or links to style sheets, for example all the links will become broken when the template is parsed.
It seems that in order for templates to work with more than text, the template files must reside in the same directory as the script that calls them.
I’d be curious if someone has a better solution.
Chris