[Zope] encoding urls of HTML links from DTML
Charlie Reiman
creiman@kefta.com
Thu, 26 Sep 2002 09:27:37 -0700
You can't do it easily. DTML considers the page raw text for the most part.
Recognizing URLs would require parsing the HTML. However, you can do this
pretty easily with javascript.
> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Mario
> Bianchi
> Sent: Thursday, September 26, 2002 3:47 AM
> To: zope@zope.org
> Subject: [Zope] encoding urls of HTML links from DTML
>
>
> Hi everybody,
> how can I access the URLs in the HTML anchor tags (the tags used for
> hyperlinks) of a n HTML page from DTML?
> I need to do so to embed in these URLs some session info.
>
> All of it should be dinamic, i.e. I don't know in advance what (and how
> many) links the page I serve to a client contains: URL rewriting
> should be
> performed on-the-fly, just before returning the HTML page to the client.
>
> I guess I should use <dtml-in argument> syntax, but what should
> 'argument'
> be? Put another way, my DTML code should scan its client object (the HTML
> page to serve to the client) looking for something like 'link' or
> 'hyperlink' or 'anchor'.
>
> Regards,
> Mario.