[Zope] href path
Dieter Maurer
dieter@handshake.de
Wed, 7 Aug 2002 20:05:16 +0200
Jose Gerardo Amaya Giron writes:
> I have the following code
>
> <a href="<dtml-var "Temporal.basepath"><dtml-var sequence-item>">
Apparently, this is a relative URL reference (one that does not
start with a protocol, like "http:", "file:" etc.).
The URL Reference specification requires your browser to resolve
relative references into absolute URLs. It must do this by prepending
a base (if the reference does not start with a '/' but is not empty)
or the "current" protocol (if the reference starts with '/').
> Here I want to give my filename the file system path to it as a link.
> My dtml varialbles will display /home/something/file.txt
>
> but when I view my document and see the links I have
>
> http://localhost:8080/Folder/home/something/file.txt
>
> What do I need to do just to have the absolute filesystem path to the
> file.
You must generate an absolute URL (probably starting with "file://".
Dieter