[Zope] Including DTML in an HREF Link?
Lennart Regebro
lennart@torped.se
Fri, 19 Apr 2002 16:26:14 +0200
From: "Dan Shafer" <pydan@danshafer.com>
> What, if any, syntax permits me to put a dtml-call construct inside a
> hyperlink on a Web page?
Not really, because that would be "passing a stream when fetching water".
:-)
DTML call is used to call functions from within DTML. Public functions are
availiable directly from an url. Thusly:
http://foo.bvar.com/path/object/method?param1=value¶m2=value
> Conceptually, what I want (with the initial angle bracket removed to avoid
> formatting issues) is:
>
> a href="<dtml-call someDTMLMethodName>">link text </a>
Yup. Remove both the brackets and the dtml-call bit and you are done!
Not all methods are availiable like this, and only the methods that return
HTML make any sense to use like this, but I'm sure you are ware of this.