Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

site map?

I know when a  CD site is published without the case sensitive index.html page, it generates an index of every file in the site. Has anyone had any success using cityscript to generate a sitemap? It would ideally update itself every time a new page is entered, but I would not want each and every separate article or file to be displayed- only where appropriate. For ex. if I have an article that uses cityscript to call out several articles, I would only want that initial article to appear in the sitemap...

Any thoughts or have any of you already solved this?

Friday, January 24, 2003

I think this site map is more all inclusive than you want but I guess you could use keywords somehow to limit articles in the map.

We use this one so that the author and I can keep from going nuts and in hopes that a better way to organize the site will occur to us.

Only main articles appear here. It includes standalone articles and CityScript pages for multi-chapter articles. That might meet your requirement, "I would only want that initial article to appear in the sitemap"

I'm sure folks have some clever ideas.

Saturday, January 25, 2003

There are two obvious ways to do this:

1. Add a keyword "(map)" to every page you want to include in your site map

2. Add a keyword "(nomap)" to every page you want to exclude from your site map

And of course, then write an appropriate CityScript loop to list them all. If you don't specify a sort order for your loop, the articles will be listed in the order they appear in the CityDesk main window, which is usually right for this sort of thing.

Darren Collins
Monday, January 27, 2003

Of course I thought of that and went to post that I had answered my own question- and the darned fogcreek site was down for the entire afternoon Friday. Thanks to you both though.

Tuesday, January 28, 2003

There is an example CityDesk tempate that shows how to do this in JavaScript, here:

David Burch
Thursday, February 27, 2003

*  Recent Topics

*  Fog Creek Home