[Zope-DB] Creating a hyperlink using results from query

Charlie Clark charlie at egenix.com
Fri Apr 8 05:53:05 EDT 2005

On 2005-04-08 at 11:44:17 [+0200], Martin Jennings <jennings at kpnqwest.ch> 
> Firstly, thank you to those who answered by query on the empty result set,
> it set me on the way to finding a solution.
> Not sure if this is the right list to ask on, but here is the question.
> I have got information from a ZSQL request in a result set and I want to
> use one of the values as a parameter in a hyperlink, how do I do this?
> I.e. <a href="htmlPage?parameter=ZSQLValue">my link<a>
> How do I write the code for this?
> Thank you in advance, and once again, sorry if this is not the correct list.

Hi Martin,

read up on doing this with PageTemplates. You need to use the TALES keyword 

Something similar to

<block tal:repeat="result myQuery">
<a tal:attributes="href result/link" tal:content="result/value"></a>

is what you want.

Charlie Clark

Professional Python Services directly from the Source
 >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::

More information about the Zope-DB mailing list