Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

Useful feature...

I want to have "sections", and I'd like to be able to create a list of the sections that I have (see my current for the list -- there's nothing behind it, but that's more or less what I want; it's currently database-driven).

Ideally, I'd do this with something like:

{$ foreach in s (folderlist) $}
{$ $}
{$ $}


Austin Ziegler
Monday, October 15, 2001

You can do this with CityDesk!


Just create two folders
one called "news"
one called "a dance of words"

put your articles inside those folders then.

for your main page, just create a link to news and a link
to dance of words, then inside those folders, create index.html files with the following code

{$foreach x in (folder "news")$}
  <a href="{$}">{$x.headline$}</a> <br>
{$ next $}


{$foreach x in (folder "a dance of words")$}
  <a href="{$}">{$x.headline$}</a> <br>
{$ next $}

Michael Pryor
Tuesday, October 16, 2001

Not quite what I'm after.

In particular, I'm after being able to generate the folder-list itself, not just the articles.

That's what's missing (e.g., a new keyword "folderlist" and not just 'folder "name"').


Austin Ziegler
Tuesday, October 16, 2001

I know what you mean. I worked around it (in creating the CityDesk help file) by creating an article for each folder. All of these articles are in a special folder which I loop over to create the list of sections.

It's a bit of a nuisance because if I add or delete a section, I have to add an article AND a folder. But it's nice because I can have teasers for sections. And I use this article as the
"home page" for the section, too -- inside the article itself I have another foreach loop which lists the contents of that section.

Joel Spolsky
Tuesday, October 16, 2001

Well, that's actually not a bad idea. Let me give that a try, as it just might work well enough to not care as much (-:

Still, with properties on folders (similar to articles), you could get the teaser effect anyway.

Austin Ziegler
Tuesday, October 16, 2001

*  Recent Topics

*  Fog Creek Home