Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

Dates - i.e. current as opposed to published

I was wondering if there is a variable that I can use to capture the current date upon publishing?

i.e. when I publish, I'd like to change the "last updated" date on the index page regardless. Even if the index page was not changed.

Any ideas?
Thanks Grant

Grant Hawksworth
Wednesday, April 23, 2003

i.e: you want to cheat your users ;o)
The most simple way you can do that is to open the index page and change the date yourself. That way some work really was done on the page to justify the new date.
Personally I try to avoid sites that implement this lousy trick. Should I believe in them when I can't even trust the Last Updated date to be true?

Jorgen Brenting
Wednesday, April 23, 2003

I'm guessing that you want your index page to note the date of the latest revision.  Here is something to put on the index page:

{$foreach 1x in (all) Sortdescendby .fileddate $}{$ setDateTimeFormat "English" "dd MMMM yyyy" "hh:mm" $} {$x.fileddate $}{$next$}

Maybe better to note the latest 3 or so revisions:

{$foreach 3x in (All) SortDescendBy .fileddate$}*{$x.fileddate$}- <A href="{$$}">{$x.headline$}</A>

Wednesday, April 23, 2003

yes thanks for that, you got it.
There was no intent to "trick" anyone, I just needed to show revision dates of the "site" as opposed to the page itsself.

Thanks for your help.

Grant Hawksworth
Wednesday, April 23, 2003

110% - That was just what I wanted. I have placed it on my personal siet, which I am migrating to CityDesk at the moment.

Thanks a heap, it has shown me some of the power of this great product.


Grant Hawksworth
Wednesday, April 23, 2003

I wish I had thought of it long ago, to use this script for copyright notices.

Something like Copyright 1999 - (the script that pulls the year of the latest article).

Wednesday, April 23, 2003

TK - that's an awesome idea. New years rolls around and you forget to update the copyright notice. Slick.

A Javascript might work even better there... it would update at the stroke of midnight.
Wednesday, April 23, 2003

Really cool idea TK - thanks!

John Topley
Thursday, April 24, 2003

*  Recent Topics

*  Fog Creek Home