Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Folders in CityScript

I can't get this script to work.

{$ foreach x in (folder "Design") $}
    {$ x.filename $}
{$ next $}

Each time I try to preview the site it tells me that the folder doesn't exist.  It certainly appears to exist and I went so far as to copy the folder name during renaming but no joy.

Any thoughts?

_
Monday, August 23, 2004

Begin your paths starting with a "/" for the root folder.  For example, if "Design" is in the first level of folders in CityDesk, the path would be "/Design"

David Burch
Monday, August 23, 2004

Thanks you!

As well,  I had another loop commented out and it tried to parse it.  I assume this is a bug?

_
Monday, August 23, 2004

I don't think you can comment out CityScript, I always cut and paste into another file for safekeeping.  I don't know if this is a a bug or a feature, but the ability to comment out sections would definitely be nice.

David Burch
Monday, August 23, 2004

Yes, you can “comment” out CityScript all right.

Use <!-- one a separate line before the code that you want to exclude and close your “comment” with --> also on a separate line - like this:

This code will work.
<!--
This code will not work.
-->
This code will work.

Jorgen B.
Monday, August 23, 2004

Thanks Jorgen

_
Monday, August 23, 2004

If I'm remembering correctly CityScript inside html comments will still get parsed when the site is published. If the CityScript is broken you will get errors.  You can prevent it from being parsed by embedding {$$} in the tags. See http://www.fogcreek.com/CityDesk/help/Scripting_With_CityScript/fog0000000061.html

Ken McKinney
Monday, August 23, 2004

Yes, you can use HTML comments, but the CityScript will still get evaluated, if not displayed--not a big help if you have a syntax problem but want to save the section for some reason.

The {$$}$$ or whatever it is some of the most awful sintax I have seen, so I haven't messed with it much.

David Burch
Monday, August 23, 2004

Okay.  Given the current radio silence, I have to say it.  With FrontPage, you know will have a new release in a year or so.  With CityDesk....

Who me?
Tuesday, August 24, 2004

Perhaps I'm a slow coach but I'm a waitin'.

_
Tuesday, August 24, 2004

*  Recent Topics

*  Fog Creek Home