Unfortunately no. For a variety of reasons (and yes laziness is one ;-) ),
the URL's in test vs prod are quite different - that part prior to the
directory in question. Think ".../~me/site/here" vs ".../~me/here".
Furtherm this site as a unit can move up or down the dir tree without
being caught by any absolute pathings.
Thanks anyway!
As it transpires, I appear to have discovered the answer in any event. Not
sure how I missed it. Sigh.
[% USE file("$template.name", root => "$dirRoot") %]
<link rel="STYLESHEET" type="text/css" href="[% file.rel("stylesheet.css",
root => "$dirRoot") %]" />
Where $dirRoot is the root of the construction zone, and set in a config
file. eg. /home/me/wip/www/tt2/src
Works like a champ!
Always the way. As soon as you give up and ask, that's when you find the
answer :-)
- Steve
> 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