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

2005-04-08 Thread Cliff Ford
Martin Jennings wrote:
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. my link
How do I write the code for this?
It depends on how you are calling the ZSQL Method, and whether you are 
returning one result or many. In DTML it could be like this:





You can shorten  to &dtml-FieldName; - but I thin 
you should get the idea.

Python uses
for result in context.nameOfZSQLMethod():
return 'Link Text' % \
result.FieldName
HTH
Cliff
Thank you in advance, and once again, sorry if this is not the correct list.
Martin Jennings
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


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

2005-04-08 Thread Charlie Clark

On 2005-04-08 at 11:44:17 [+0200], Martin Jennings <[EMAIL PROTECTED]> 
wrote:
> 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. my link
> 
> 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 
"attributes"

Something similar to





is what you want.

Charlie
-- 
Charlie Clark
eGenix.com

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 ! 
___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db


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

2005-04-08 Thread Martin Jennings
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. my link

How do I write the code for this?

Thank you in advance, and once again, sorry if this is not the correct list.

Martin Jennings

___
Zope-DB mailing list
Zope-DB@zope.org
http://mail.zope.org/mailman/listinfo/zope-db