Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Variable for "ThisFolder"???


Perhaps I have overlooked this, but I cannot seem to find a variable for "ThisFolder", so that it could be used in links and such.

I am being forced to code another app to handle any loops that deal with non-articles. CityDesk really needs this functionality added ASAP; simply define the item under the loop: foreach x in (and (isArticle)) ... or (isImage) ... etc.

James A. Kennemore, Jr.
Sunday, September 07, 2003

From http://www.fogcreek.com/citydesk/2.0/help/WhatsNew/WhatsNewin2.0.html

"A new thisFolder condition in forEach loops returns all articles in the same folder as the article being produced."

John Topley (www.johntopley.com)
Monday, September 08, 2003

The thisFolder condition works only for articles. You can't iterate over images or any other non-CityDesk objects added to a folder.

Janek.

Janek Schwarz
Tuesday, September 09, 2003

Well, you can create a template called 'files' and just give it {$.body$} for a script.  You then get the features of an article.  Kinda kludgey, but ....

Joel Goldstick
Tuesday, September 09, 2003

Apparently I haven't made myself clear. I need a VARIABLE that will return the CURRENT FOLDER. For instance, in an article under a folder named "ABC", I should be able to use {$.ThisFolder$} and get "ABC".

James A. Kennemore, Jr.
Tuesday, September 16, 2003

You are not the first who would like that, but it doesn't work that way.

Not the answer you would like, but server side code could be used to do this

Joel Goldstick
Tuesday, September 16, 2003

*  Recent Topics

*  Fog Creek Home