Woohoo! CityDesk 2.0 has been released into Beta! If you're interested, you can find out more here. The best part is that it's free to registered CityDesk 1.0 users. The Beta period will run for around 8 weeks, and the official release of CityDesk 2.0 is expected in early to mid July 2003.
The list of new features is impressive, and addresses most of the requests that have cropped in the CityDesk user forum (well, the reasonable ones, at least!).
I've downloaded and installed the Beta, and it looks very good so far. Here are some of the highlights from my first session with it:
Picture Editor
The picture editor is very handy for quick fixes to the images in your site - rotating, scaling, cropping, etc. Unfortunately there's no Sharpen command, which is needed a lot with web images, so I'll have to keep using my external picture editor anyway.
Automatic Backup
The site backup feature is handy - once you've set up a backup directory, CityDesk automatically creates a copy of your .cty file there every time you exit the application. You can configure the number of previous copies to keep, depending upon how paranoid you are.
Colour HTML Syntax Highlighting
This is really cool. When you switch to HTML mode, tags are highlighted in a different colour to normal text, and URLs really stand out. It makes HTML editing a much more pleasant experience.
Field Renaming
I'm already putting this feature to work in my list of photographs I've entered in competitions. To create this list, I use an article for each photo. I put the full-sized photo and a description in the body, and I put technical info, a thumbnail photo, and competition details into the Sidebar, Extra1 and Extra2 fields respectively.
I've now renamed those fields to Technical Info, Thumbnail Image and Competition Entries. I've also disabled the Teaser and About The Author fields, so they aren't displayed at all in the Extras tab. This really makes it easier to add new content later when you can't remember which field to put which info into, and would be a big help in communicating the structure of sites that are designed for other people to maintain.
Next and Previous Links
While I was playing around with those photos, I added Next and Previous links to their template. The code to do this is:
<table width="100%"><tbody>
<tr>
<td align=left width="50%">
{$previousLink p in (folder "Photos") $}
<<
<a href="{$p.link$}">{$p.headLine$}</a>
{$end$}
</td>
<td align=right width="50%">
{$nextLink n in (folder "Photos") $}
<a href="{$n.link$}">{$n.headLine$}</a>
>>
{$end$}
</td>
</tr>
</tbody></table>
Easy!
Overwriting Files On Drag-n-Drop
I look after the web site for the Down Syndrome Association of NSW. I frequently receive updated PDF files from the staff, and it used to be a real pain to replace the old file of the same name. I had to delete the old file, add the new file, and then update all the references across the site to point to the new file. Now, I can just drag-n-drop the updated file into the appropriate folder, and CityDesk asks me if I'd like to replace the existing file of the same name. Sweet.
Insert Variable Menu Item
This is a time-saver. In CityDesk 1.0, you had to type out a variable's name whenever you wanted insert it. This was error-prone, and it was hard to remember all the variables you'd defined for your site. Now, variables can be inserted from the Edit >> Insert Variable or Insert >> Variable menu items (I'm not sure why it's in two places - they seem to do exactly the same thing!). Much easier.
This feature would be even more useful if you could specify in the Variable Editor which variables appear in the list and which don't. Most of my sites have a lot of variables that are only used in the templates or CSS files (e.g. copyright notices, spacer gifs, page colours, etc). I don't want them to clutter up the list of variables I might want to insert into an article.
While we're at it, it would be really handy to be able to specify the order in which variables appear in the list. Currently they're listed in the same order as the Variable Editor window, which is just the order in which they were created. You can't rearrange them into some sort of logical grouping (e.g. put all the variables that define lists of links next to each other).
Remove Formatting/Paste Without Formatting
These are handy timesavers. Because Paste Without Formatting used to lose paragraph breaks, I was never able to use it. I always pasted formatted text into Notepad and then copied it back into CityDesk to strip the formatting.
Alt-Tab Is Fixed
This was one of my biggest annoyances with CityDesk 1.0. Whenever you tried to Alt-Tab between an Article and, say, an Internet Explorer window (when copying text into your site, for example), the CityDesk Main Window would keep popping up and messing up your window ordering. It now works properly.
Site Properties
I've got the Home version of CityDesk, which allows me to publish sites with up to 500 items. CityDesk 1.0 didn't show you how many items your site contained, until eventually you hit 500 and it refused to publish until you deleted something. Now you can keep an eye on your site stats with File >> Properties.
Publish Window Popping To The Front
I don't know how many times I've started a Publish operation for one of my sites, switched to another application to do something else while I wait (generating the site can take several minutes), then had the Publish dialog pop to the front while I'm typing, causing the operation to cancel. Grrr. In CityDesk 2.0, it no longer pops up while you're working in another window.
Include Statement
I use some articles to hold fragments of content that get pulled into other articles at publish time. The the right-hand column on my Photography page is a good example of this. In CityDesk 1.0, I needed a foreach loop to pull the article body into a page:
{$foreach y in filename "Quick Photo Links"$}
{$y.body$}
{$next$}
Now, I can just use the include statement:
{$include "Quick Photo Links"$}
Short and sweet.
ForEach In Subfolders
This really simplifies some of my CityScript conditions. You can use (folder "blah/*") conditions to include all articles in the folder "blah", and also all articles in all subfolders of "blah" (e.g. "blah/blarg", "blah/gloop", "blah/gloop/bing", etc). This makes site maintenance much easier, as adding or removing subfolders doesn't require me to update CityScript loops.
It's still frustrating not to have a condition like (folder "."), which returns all articles in the current folder. This would allow CityScript loops to be much more generic. Hopefully Fog Creek will add this feature soon.
ModifiedDate Article Field
In a happy example of cosmic coincidence, this feature came along right at the same time I was trying to script a What's New page for the Down Syndrome Association of NSW site. What I really wanted to do was display a list of new pages added recently, and a separate list of older pages that were recently updated. I had resorted to building the second list by hand.
With CityDesk 2.0, I was able to script both lists:
<H2>Latest Additions To This Site</H2>
<P>New pages:</P>
<UL>
{$foreach x in (after today-30)
sortDescendBy .filedDate$}
<LI><A href="{$x.link$}">{$x.headline$}</A>
<EM>({$x.filedDate$})</EM>
{$next$}
</LI></UL>
<P>Updated pages:</P>
<UL>
{$foreach 10 x in (before today-29)
sortDescendBy .modifiedDate$}
<LI><A href="{$x.link$}">{$x.headline$}</A>
<EM>({$x.modifiedDate$})</EM>
{$next$}
</LI></UL>
The first list shows all articles filed (created) in the last 30 days. The second list shows the 10 most recently-modified articles, excluding any articles that appear in the first list. This stops new articles appearing in both lists.
The second list is not ideal - I'd prefer to show all articles that were modified in the last 30 days, rather than just the most recent n. It would be nice to see some new conditions like (modifiedBefore <date>), (modifiedAfter <date>), etc added to a future release.
MonthOf and YearOf Conditions
These are great for my blog page (even though I haven't updated it in a while!). My old CityScript for generating the monthly archives looked like this:
{$foreach x in (and (folder "Blog")
(after 2002/12/31) (before 2003/02/01))$}
<P class=fileddate>{$x.fileddate$}</P>
<P class=description>{$x.body$}</P>
{$next$}
In CityDesk 2.0, I no longer have to remember how many days are in each month and set up a complicated condition:
{$foreach x in (and (folder "Blog")
(monthOf 2003/01/01))$}
<P class=fileddate>{$x.fileddate$}</P>
<P class=description>{$x.body$}</P>
{$next$}
YearOf works similarly, but I haven't needed it yet.