Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Aparently no way to do Relate Folders?

Hi, I was trying to relate articles of 2 diferent folders, the sintax looks good, perhaps give a unexpected ")" error..

{$foreach x in (folder "Cinema")$}
{$x.headline$}
{$x.teaser$}
{$foreach y in and( (folder "Movies")(keyword_contains "{$x.extra1$}") )$}
{$y.teaser$}
{$next$}
{$next$}

Any Ideas?

Seriousmoon
Tuesday, March 18, 2003

Use Put the Y loop in the Extra 1 and make the X loop:

{$foreach x in (folder "Cinema")$}
{$x.headline$}
{$x.teaser$}<br>
{$x.extra1$}
{$next$}

www.marktaw.com
Tuesday, March 18, 2003

You should be able to nest loops like you want, but you can't make a variable a condition.

www.marktaw.com
Tuesday, March 18, 2003

Syntax look good, however Citydesk can't handle this as far as I know. Wish it could...

Adriaan van den Brand
Tuesday, March 18, 2003

The best workaround if you want to enumerate folders is to drop a unique index article in each folder.

For example
index
+--FolderA
    ix
+--FolderB
    ix

Then you can loop based on (filename "ix"), or a keyword.

Joel Spolsky
Wednesday, March 19, 2003

except you'll bring the index article in the loop as well. the index article doesn't need to bein the folder.

i guess you can do something similar to my "more tips" post

www.marktaw.com
Wednesday, March 19, 2003

*  Recent Topics

*  Fog Creek Home