Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Nesting loops ???

Can someone give me a hint on nesting the loops please. If you tell me it can't be done - fine as well, I just need to know if there is a function for that. In the help pages and examples there is
{$ foreach x in (folder "TopLevel") $}
  {$ next $}

and also

{$ foreach x in (all) $}
  {$ next $}

but I can't seem to combine them into this:

{$ foreach x in (folder "TopLevel") $}
    {$foreach y in folder (all) $}
    {$ next $}
{$ next $}

so I only get contents of all folders inside the "TopLevel" folder, but not anything from other folders on the same level as TopLevel is... Any hints?

Lubosh

PS: If emailing me please replace COLD by HOT !

Lubosh Hanuska
Thursday, August 08, 2002

No nesting loops so far.

If you are ambitious, Adriaane has done some really cool things with Java script.  See the first item in ".cty downloads" here.

http://tk-jk.net/city/Articles/fog0000000010.html

tk
Thursday, August 08, 2002

Currently the only ways I know of are:
* use a script (javascript/php/asp) to filter
* use keywords
* use complex conditionals
e.g.
foreach x in (or (or (folder "top")  (folder "top/sub1") )(folder "top/sub2) )

Adriaan van den Brand
Friday, August 09, 2002

This sounds like a job for conditions to me too. (and (folder "Topblah") (all) )

But that's the same as (all) anyway...

MarkTAW.com
Friday, August 09, 2002

*  Recent Topics

*  Fog Creek Home