oh, well i think i replied a little too quickly. my appologies. Why is it your templates can't know the absolute path? It would seem to me that either a) as the template author, you know where the templates will be rendered to, or b) as the programmer calling the templates, you know where the templates will be rendered to. In the former case you ought to be able to hard code the absolute path. In the latter case, you ought to be able to pass in the absolute path as a template parameter.

HTH

Stephen Howard wrote:

would it be feasible to use absolute urls? ie:

/path/to/style.css


[EMAIL PROTECTED] wrote:


Hi,

I'm trying to construct a template that will output relative directions to
(initially) a stylesheet for a a series of html generating templates.


Have the following structure:
./style.css
./1.html
./2/2.html
./2/3/3.html

The idea being that 1.html, 2 and 3 all refer to the same stylesheet
upwards. Rather than top down.
so 1.html has "./style.css"
2.html has "../style.css" ; 3 has "../../style.css".

But I just cannot get this to happen.
The main problem being that the lower html templates do not appear to have
any obvious way of identifying their full or even relative path. So my
logic of start from your current template and work up doesn't work:
Conceptually:
USE "template.name"
file.relpath "$root/style.css"


I presume I can probably do this via [% PERL... but would rather try a
"proper" way before I "cheat" :-)


Thanks!



- Steve




_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates





_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates



_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to