Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

Repeat Publishing Revisited

There are two components to my idea.

One is revise the sunrise/sunset section so that you can select day of week, day of month, and month. Think of the Outlook repeat occurance section (most other PIMs will have the same interface, it's very basic). You can have a "Third Thursday of November" for Thanksgiving and other things, just like Outlook. You would also be able to select multiple days, again, just like outlook, so it could handle Hanukah and Lent as well.

This article would only be published on this day. You would have the option of turning it off only for loops, certain loops (i.e. not on the homepage, but in the archive), or simply not to publish it at all. Maybe you could have two sets of keywords, one for when it's active and one for when it's inactive?

The second component is to create loops that can handle this advanced calendaring.

For example, think of the Google graphic. On Easter they have a different banner than on Thanksgiving than on a normal day. (How's that for something you want to appear only once and then go away AND have come back in a year?) They even had a banner for the opening ceremony of the olympic games.

To do this in CityDesk (or any CM system) you'd have to be able to add some pretty powerful if/else statements, combined with a robust metadata capture system (as described above).

The simplest way I can think of to do this is to add a "SortAscendBy .folderorder" loop. Then you could put all of these things in 1 folder, each with their specialized date requirements, put the most important ones on top, and the default on the bottom, and voila, instant "on this date only" loop.

For example, let's take the google graphic.


Then a {$foreach 1 x in (folder "googlegraphic") SortAscendBy .folderorder$} would give you only the one relevant image, and a default would exist. This operates almost exactly like an if/else statement.

I know this is a complex system, and prone to unexpected loopholes. Can anyone think of any? I know I really put my foot in it when I said "can appear in an archive all the time" because that opens up it's own can of worms, which I'm confident can be addressed. My keyword idea works well, similar to the multiple languages interface, but how do you do this with folder-based loops?

Mark W
Sunday, February 10, 2002

I know I've criticised this idea before, but I feel the need to respond again. I still don't think CityDesk is the way to do this.

Here's an example to illustrate my point. Similar to Google, you want to replace your site's normal logo with a patriotic one on American Independence Day. Let's assume Joel has added this functionality to CityDesk to explore how it might work.

You need to start up CityDesk and publish your site at 12:01 am on Independence Day to replace the default logo with your patriotic one. Then at the end of the day (or really, at 12:01 am the next day), you need to start up CityDesk again and publish again to set the logo back to your default one.

Is CityDesk really the right tool to do this with? It's PC based, so it can't affect things on your web server while your PC is offline.

If you forget to wake up early and publish, the patriotic logo won't be there when people log on in the morning. If you don't get around to publishing your site for a few days after Independence Day, the patriotic logo hangs around longer than you intended.

Since you need to wake up, start up CityDesk, and publish your site manually for the change to take effect, why not just do it manually? It really only involves FTPing one file to the server, after all.

Of course, the foolproof way to do this would be to set up some scripts on your server. Why not just configure a cron job on the web server that runs at 12:01 am to copy "patriotic_logo.gif" to "logo.gif", and another one to run 24 hours later to copy "normal_logo.gif" to "logo.gif"? That way you won't need to manually publish your site for the change to take effect, since all your web pages just reference "logo.gif".

This feature would be a second-rate kludge if it was added to CityDesk. There are dozens of more useful, more sensible features I hope they implement before this one reaches the top of the list.

Darren Collins
Sunday, February 10, 2002

*  Recent Topics

*  Fog Creek Home