Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

Linking article to article with script?

I'm publishing a book.  Each article will be a chapter.  I'd like my article template to have:
1. A link to home (I know how to do that)
2. A link to the previous article (chapter)
3. A link to the next article (chapter)

So, when the surfer is reading Chapter 2, he'd see a link to Home, Chapter 1, and Chapter 3.  Of course there are exceptions for the first and last chapter.

I know I could hard code these.  Can I do it by scripting?

Terry Kearns
Tuesday, October 16, 2001

We don't have any way to do automatic "Next" and "Back" links.

It's a slightly difficult problem, because:

* "Next" and "Back" would have to be defined in terms of a particular sort order, otherwise they don't make sense, and a particular "filter", e.g. one folder or one keyword
* You'd have to have a way to decide what happens to the Next Link on the last page -- you might decide to change it to "Go back to the beginning" or something.

We'll work on a good design for it, probably for a future version though. In the meantime you'll just have to Insert Link and make manual links.

Joel Spolsky
Wednesday, October 17, 2001

To implement this feature in a future version, you might want to consider offering a way to create article "packages" that consist of more than one page. That way, you would be able to specify the page # and the behavior for the first and last pages on the property page for the group and each article...Just a thought...

Jonathan Goodyear (aka angryCoder)
Wednesday, October 17, 2001

*  Recent Topics

*  Fog Creek Home