Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

(publishdate) displayable?

Suppose we want our index page to be a splash page with a "most recently modified" field.  Is there a way to have CityDesk generate the publish date onto a webpage?

I'm trying to save myself the step of having to remember to update any date field at all.

Apologies in advance if it's there and obvious.  I just seem to be missing it.

David Blume
Tuesday, June 25, 2002

This is what I do.  It gives the "fileddate" of the article with the most recent "fileddate"  I put in on the home page to reflect the most recent change to the site.

{$ foreach 1x in (all) SortDescendBy .fileddate $}{$x.fileddate$}{$next$}

I do this list the 5 most recent articles:

{$foreach 5x in (All) SortDescendBy .fileddate$}* {$ setDateTimeFormat "English" "dd MMMM yyyy" "hh:mm" $} {$x.fileddate$} - {$x.filename$}

Tuesday, June 25, 2002

Excellent!  Thanks.  This tip is worthy of archiving someplace that's searchable.

Speaking of archiving:  The Knowledge Base needs to be brought back to life, and should have a search feature.

I'm on a roll:  Somebody at FogCreek, document the undocumented shortcut keys, too.  Ctrl-Y and Shift-Enter, among others.  We'd use them if we knew about them.

David Blume
Tuesday, June 25, 2002

Terry (that 'tk' guy above) maintains a great searchable list of tips at:

Darren Collins
Tuesday, June 25, 2002

Not only is this specific tip there, it's on the main page in the side bar.  No searching required.  Only reading was required.  Well, looks like I'm no different from the usual user Joel writes about.  "Users don't read dialog boxes" or something like that.

Guess I missed it because I'd assumed all the tips were on the LHS, and the sidebar was tangential commentary.

Thanks, Terry for being so gentle with me in your replies.  I must seem very obtuse.

David Blume
Wednesday, June 26, 2002

If you could have read some of the panicky emails I've sent directly to the Fog boys, well, it would be embarrassing.  They were always kind to me.

Have you read this?
Search that page for "secret."

I believe that the Fog folks have an exhaustive list of bugs/features ready to fix/implement just as quickly as the can, along with more extensive documentation, a few example templates.  Someone might even be writing CityDesk for Dummies (and for me).  Now, if I could just figure out Adriaan's Java Script, or any Java Script for that matter.

Wednesday, June 26, 2002

What about my javascript?

I'm sorry, the version you have contains too much garbate (Fireworks roll-over menu code that is not used in the demo).

If (more) people are interested, I can publish some explanation on it.

I may convert it to a PHP version (advantage: no javascript needed and search engines will like the additional links)

(the secret: I use abslink as a reference from article to the generic script; the script contains all abslinks of 'index' pages; that is the page inside a directory/folder you'll see when you type

On the other hand: it is a poor mans solution! I really hope that the next version of Citydesk will make  my script opsolete...

Adriaan van den Brand
Thursday, June 27, 2002

It's not about your java script, it's about my shallow understanding.  I admire what you've done and think it's a breakthrough.  It's inspired me to try to learn how it works.  That's a good thing.  We'd both prefer we could do it with a CityDesk trick though.

Thursday, June 27, 2002

This "most recent date" trick is clever.  However, I think it points out the fact that this stuff really should be easier.  I mean, why not have a system variable of some kind for this and other tasks.  What makes CD attractive to me is eliminating the need to write code or think like a programmer.  More of this should be built in to make site maintenance easier.  I spend several hours every week doing stuff that should be automated.


Zack Urlocker
Wednesday, July 3, 2002

*  Recent Topics

*  Fog Creek Home