Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

feature request (badly expressed)

this feature request will surely annoy Michael ;-) , because it's not expressed in terms of goals, but...

an easy way of coding links to "previous" page and "next page" has already been asked here. But Joel accurately answered that it was not so simple to implement, because "previous" and "next" may refer to a very large set of criteria...

I wonder if a simple "alteration" of foreach loops syntax could do the job

{$ for previous x in (condition) sortdescendby .criteria $}
<a href="{$x.link$}">previous article</a>{$endfor$}

of course, "for following", could work too.

This suppose that the current article belongs also to the "condition" statement, otherwise the for/endfor block should be ignored.

And if there is no previous or no following article according to the sorting criteria, the for/endfor block should be ignored too.

this way of coding would have the interest to limit new syntax introduction into city script, and solving a problem that has no easy solution today.

any comment ? Am I completely wrong, or could it help ?

Vincent Bénard
Tuesday, March 26, 2002

See these threads:

http://discuss.fogcreek.com/CityDesk/default.asp?cmd=show&ixPost=2636&ixReplies=4
http://discuss.fogcreek.com/CityDesk/default.asp?cmd=show&ixPost=2626&ixReplies=9

Apparently you can't even implement a "Link to all files but this one" script in the current version of CityDesk.

Sounds like this feature should be implemented along with "folder and subfolder" - this would be "each in this folder (or condition) but with knowledge of where this document is in the chain" coupled with some way to limit it to "first, last, previous, and next."

Mark W
Tuesday, March 26, 2002

*  Recent Topics

*  Fog Creek Home