RE: [PHPTAL] Empty loops

2009-06-18 Thread phptal
Hi Kornel, > -Original Message- > Sent: 18 June 2009 10:13 > > In PHPTAL empty array evaluates to false, so this works: > > No titles found. tal:condition="titles"> ... > > > If you want an empty list item: > > > No titles found > > title is missing

Re: [PHPTAL] Empty loops

2009-06-18 Thread Kornel Lesinski
On 17 Jun 2009, at 19:59, wrote: I find the following works well for me to provide a list of webpage titles with hyperlinks title is missing What I would also like to do is provide an empty entry if there are no webpage titles in the database. For examp

Re: [PHPTAL] Empty loops

2009-06-17 Thread Reza Sanaie
Just don't pass in the titles variable, and in TAL do a tal:condition="exists: titles" around your loop, and have another block with tal:condition="not: exists: titles" for your No titles found block. php...@jakeman.plus.com wrote: Hi, I find the following works well for me to provide a list