[ZPT] Relative URL
Sam Collett
Sam.Collett@gp-b81091.trent.nhs.uk
Tue, 18 Dec 2001 09:33:59 -0000
I can get it to work using an absolute URL:
<img tal:attributes="src string:${here/absolute_url}/images/logo">
this becomes <img src="http://localhost/test/images/logo">
I would normally code <img src="/test/images/logo"> to keep the code
smaller, but if the folder test was changed, all the template codes will
have to change. Will the longer code mean longer download times for the
user?
Will the code work for any files that use the template (if they are under
the folder test, for example /test/1/2/3/4/5)?
Also can the code be shortened (is string: really necessary?)
> You got a "NameError: not found...", right?
I get BASE2 not found in 'BASE2', at line 11, column 4
> Looks almost good. But, you should use "${request/BASE2}"
> instead of "${BASE2}".
That seemed to have worked