Re: [Zope] Re: Output only the first or a particular record using TAL

2005-09-29 Thread Chris Withers
Julian Yap wrote: Another query I had was on the practice of using control flow (ie. if, for, etc.. statements). I guess the best way is to keep your control flow in Python scripts? Is this the common practise? Well, it seems to be that a little bit of python in a tal:condition is quite

Re: [Zope] Re: Output only the first or a particular record using TAL

2005-09-28 Thread Tino Wildenhain
Am Mittwoch, den 28.09.2005, 16:32 +1000 schrieb Julian Yap: --- Chris Withers [EMAIL PROTECTED] wrote: ... Now, if you really can't stop your sql returning more than one row (LIMIT 1 anyone?) then how about: tr tal:define=customers container/getCustomerLicences;

[Zope] Re: Output only the first or a particular record using TAL

2005-09-28 Thread Julian Yap
--- Chris Withers [EMAIL PROTECTED] wrote: I used the following and it works great (without some formatting for clarity): tr tal:define=customer container/getCustomerLicences tal:condition=customer tdCustomer: span tal:content=python:customer[0]['full_name']/span/td /tr hmm,

[Zope] Re: Output only the first or a particular record using TAL

2005-09-28 Thread Julian Yap
--- Tino Wildenhain [EMAIL PROTECTED] wrote: Am Mittwoch, den 28.09.2005, 16:32 +1000 schrieb Julian Yap: --- Chris Withers [EMAIL PROTECTED] wrote: ... Now, if you really can't stop your sql returning more than one row (LIMIT 1 anyone?) then how about: tr

Re: [Zope] Re: Output only the first or a particular record using TAL

2005-09-23 Thread Chris Withers
Julian Yap wrote: I used the following and it works great (without some formatting for clarity): tr tal:define=customer container/getCustomerLicences tal:condition=customer tdCustomer: span tal:content=python:customer[0]['full_name']/span/td /tr hmm, this strikes me as just plain wrong :-S

[Zope] Re: Output only the first or a particular record using TAL

2005-09-14 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Julian Yap wrote: Hi all, I wanted to create something of a header using TAL and a Z SQL Method. I have the following code where getCustomerLicenses is my Z SQL Method and it prints out the customer's full name with details: tr

[Zope] Re: Output only the first or a particular record using TAL

2005-09-14 Thread Julian Yap
Thanks Tres, Sascha and Jirka for your help. I used the following and it works great (without some formatting for clarity): tr tal:define=customer container/getCustomerLicences tal:condition=customer tdCustomer: span tal:content=python:customer[0]['full_name']/span/td /tr The above condition