Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Order of Articles on Index Page

Let's say you write your newest article (call it Article A) today, and of course you have a link to it on the index page.  That article appears at the top of the list of articles on the index page, because it's the newest article.

Now, suppose you want the article to appear further down the list, or, alternatively (and more likely), a few days from now you have written more articles (Artcles B, C, D, etc.), but you want to bring Article A to the top of the list.

If you change the "filed date" under the "properties" tab, you can change the date that *appears* with the article, but doing so does not change the order of the articles on the index page.  And so you're left with a list of article links on the home page that appear in the order you saved them in CityDesk, but not in the chronological order of "filed date".

I'd like to be able to do such a thing, but don't know how.  Any ideas???

Thanks!

Gilles
Friday, June 14, 2002

I'm not sure I understand.

If you use a sort like this in your CityScript:
{$ foreach x in (all) SortDescendBy .fileddate $} you'll get the article with the most recent filed date first.

If you don't sort, the articles will appear in the order they appear in the folder.

It's handy to be able to do it both ways.

tk
Friday, June 14, 2002

Thanks, tk!  I wasn't aware that the order of the articles in the folder is the drive for how they are displayed.

On another note, perhaps you know the answer to this problem (I posted this question to the forum some time back, and followed the one suggestion I got, but it doesn't help that much...plus the suggestion didn't explain why this is happening.  Anyway, this is the problem...

I created a site, and, because I was learning how to use CD, named the .cty file "testsite" . Now I'm ready to publish, and want to change the name to the site's name, rather than "testsite.cty".

My first impulse was to start a new .cty file, assign it the actual name, and then copy the articles including INDEX.HTML from the "testsite.cty" to the new site.

Well, I gave it a whirl and discovered that when I previewed the site on my local machine the {$x.headline$} link in the "index" article has, in its path, e.g. "citydesk_1052" but all the articles have a DIFFERENT path, e.g. "citydesk_960". Therefore, clicking on an article resulted in FILE NOT FOUND. A preview of the "testsite.cty" site revealed that it has the SAME path as the new site. My guess is because I copied the index file from "testsite.cty" to the new site, the new site {$x.headline$} link is pointing to the location of "testsite.cty"

A far easier solution, I now realize, is to simply rename a copy of "testsite.cty" in, say, windows explorer. (You can stop lauging now.)

Nonetheless, I'd like to know if there's a way to force the path in the {$x.headline$} link.

Thanks!

Gilles
Friday, June 14, 2002

Once again, I may not understand what you mean.

I don't pay any attention to the preview URL stuff.  I'll preview, notice a problem, fix it and preview again.  I end up with boat loads of IE windows open.

I've renamed several sites, done straight copies of sites, never had any problems with doing that. I've also had to restore some sites to previes versions from a backup due to horrible mistakes I've made (and due to too much reliance on the unpredictable undo feature), Works fine for me.

tk
Friday, June 14, 2002

Hmm, I wonder why it's doing that.

At any rate, your SortDescedBy solution works very well.  Thanks much!

Gilles
Friday, June 14, 2002

Those "citydesk_960" folders are TEMPORARY folders. You shouldn't be using them for links at all EVER. You also shouldn't copy your index.htm from IE and paste into CityDesk.

I'm not sure why you would want to copy the articles from one citydesk site to another. You can go into Variables and change the SiteName variable and it will change all over your site. If you just wanted to change the filename, then yeah Windows explorer works.

MarkTAW
Thursday, June 20, 2002

*  Recent Topics

*  Fog Creek Home