Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

Field for folder

I would like to see a field for the folder, so I can use something like {$ .folder $} to see in what folder the current article is being published and then list all or some articles in the same folder.

{$ foreach x in (folder {$ .folder $} ) $}
{$ x.headline $}
{$ next $}

David Pettersson
Friday, December 7, 2001

Yep -- our scripting language is simple enough that even dogs can use it, but it's not too powerful. (Dogs are friendly but none-too-smart).

In particular the nested {$ $} wouldn't quite work. But we're aware of this problem and we'll find a way to do it.

Joel Spolsky
Friday, December 7, 2001

Direct variable inclusion looks easy enough. I have uses for (folder .folder) and (keywords_include .extra1).

This looks as good a place as any to request {$ if (clause) $}, permitting all clauses useful in foreach (treating the existence of any results as true) as well as a simple .variablename treating non-empty as true.

Garth Kidd
Sunday, December 9, 2001

Any additional thoughts on a field for folder - {$ .folder $} to see in what folder\subfolder the current article is in.  It would make for an easy navigator \ place header.
Sports \ Hockey \ Scores
Sports \ Basketball \ Articles

Mike Oswalt
Thursday, December 13, 2001

*  Recent Topics

*  Fog Creek Home