[cl-who-devel] Re: CL-WHO question
Edi Weitz
edi at agharta.de
Wed Feb 1 01:21:39 UTC 2006
Hi!
[Please use the mailing list for questions about CL-WHO.]
On Tue, 31 Jan 2006 16:39:30 -0000, "Rob Blackwell" <rob.blackwell at aws.net> wrote:
> I've been experimenting with CL-WHO, but I'm struggling to understand the
> following behaviour and I wondered whether you would be kind enough to offer
> advice?
>
> I want to take a string, say "rob", and turn it into a link like "<a
> href='rob.htm'>rob</a>".
>
> I've tried various things like
>
> (let ((person "rob"))
> (with-html-output-to-string (*standard-output*)
> (htm (:a :href (fmt "~a.htm" person) (str person)))))
>
> But that returns
>
> "<arob.htm>rob</a>"
(let ((person "rob"))
(with-html-output-to-string (*standard-output*)
(htm (:a :href (format nil "~a.htm" person) (str person)))))
(let* ((person "rob")
(link (format nil "~a.htm" person)))
(with-html-output-to-string (*standard-output*)
(htm (:a :href link (str person)))))
Attribute values aren't treated like the body of a tag.
See <http://weitz.de/cl-who/#syntax> for details.
Cheers,
Edi.
More information about the Cl-who-devel
mailing list