Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

next/prev based on date

Is it possible?

Or is it just based on the order in the folder?

Fredrik Jacobsson
Sunday, July 06, 2003

Duh, me stupid and didnt think.

Please disregard of the post..

Fredrik Jacobsson
Sunday, July 06, 2003

Another next/prev question instead :)

In one article I insert the body of the newest article in another folder using:

{$ foreach 1 Skytteliga in (folder "Skytteliga") sortDescendBy .filedDate $}
{$Skytteliga.body$}
{$next$

Now....I'd like to use next/prev with that, wanting ppl to be able to browse easy to the next newest artile in the folder "Skytteliga". And so on.

Is it doable, or does the "foreach 1" makes it impossible?

Fredrik Jacobsson
Sunday, July 06, 2003

It doesn't seem doable on the surface - the loop will always be relative to the article you're looking at, not the one being pulled in.

www.marktaw.com
Sunday, July 06, 2003

Just what I thought. Thanks for the confirmation.

Or can somone prove us wrong? :)

Fredrik Jacobsson
Sunday, July 06, 2003

Or perhaps any other idea how one may pull in the body for the newest article in a folder without breaking next/prev

Fredrik Jacobsson
Sunday, July 06, 2003

I solved it by doing next/prev for the articles in the folder, but when pulling the body most recent one into another article I added:

{$ foreach 2 NextSkytte in (folder "Skytteliga") SortDescendBy .filedDate $}
{$ even $}
<a href="{$NextSkytte.Link$}">Föregående</a>
{$ next $}

That worked to get the next newest, and since when ppl click on that they get into the folder where I have the next/prev feature everything works smooth.

Fredrik Jacobsson
Sunday, July 06, 2003

*  Recent Topics

*  Fog Creek Home