[ZPT] StyleSheets
Sam Collett
Sam.Collett@gp-b81091.trent.nhs.uk
Tue, 18 Dec 2001 09:47:15 -0000
I used src instead of href!
<link rel="stylesheet"
tal:attributes="href string:${here/absolute_url}/css/default.css"
type="text/css">
It works no using the above code.
I get http://localhost/Test/css/default.css
http://localhost/Test/subfolder/css/default.css seems to work as well, even
though there isn't a 'css' folder in 'subfolder', but that's a feature of
Zope isn't it (?traversal) ?
-----Original Message-----
From: Dieter Maurer [mailto:dieter@handshake.de]
Sent: 17 December 2001 20:22
To: Sam Collett
Cc: ZPT List (E-mail)
Subject: Re: [ZPT] StyleSheets
Sam Collett writes:
> <link rel="stylesheet"
> tal:attributes="src string:${here/absolute_url}/css/default.css"
> type="text/css">
>
> The output is:
>
> <link rel="stylesheet" type="text/css"
> src="http://localhost/Test/css/default.css">
>
> However it does not seem to render the page correctly.
>
> When I hard code:
>
> <link rel="stylesheet" type="text/css" src="/Test/css/default.css">
>
> it works.
This does not seem to be a ZPT problem but an "absolute_url" problem:
apparently, it gets the "SERVER_URL" wrong.
What do you see, when you let your browser resolve a relative(!)
URL? "http://localhost:8080/...", "http://<hostname>/..."
or "http://localhost/<zope>/..."?
Do you use "SiteRoot" or "SiteAccess"?
Dieter