Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

CityScript question

How do I include every article but the first 10 in my archived posts page?

Israel Orange
Saturday, August 02, 2003

I don't think that is possible in CityScript.  But you can list all the articles before or after a certain date, or x number of days before or after today.

Joel Goldstick
Saturday, August 02, 2003

Dang. I was worried that it wasn't possible yet.

Israel Orange
Saturday, August 02, 2003

IO, There have been some big disagreements about the disirability of this one (all but the first 10 or whatever). One of the ideas is that if you have an archive page, the user might expect it to contain the whole archive rather than everything but the latest 10.

tk
Saturday, August 02, 2003

Well, my archive page is labeled "previous posts" so I think they'll know that it's non-recent items only.
Oh, well. It's no big tragedy. I'll just rename the page, "archived posts" and deal with it.
If someone does figure out a way, I am still interested.

Israel Orange
Saturday, August 02, 2003

You can use date math such as (before today-10) to get all articles older than 10 days old...

Joel Spolsky
Saturday, August 02, 2003

That's cool, Joel. (Although I'm still trying to figure out how to get everything *but* "for 10 x in folder("blah")". Is there any way?)
Does CityScript have the ability to do string comparisons? (ie, can I say, if x.headline = "yadda yadda" then do this?)

Israel Orange
Saturday, August 02, 2003

Dude, it's Saturday night. See ya!

Israel Orange
Saturday, August 02, 2003

--just came by looking to ask this exact same question:  how to select all articles *after* the first X articles in a given folder.  Selecting by date is perfect for routinely updated sites, but isn't as applicable in the case of sites that aren't updated on a set schedule.

e.g., I'll sometimes go a couple of weeks, sometimes a couple of months, without an update.  I'd still like to show the 5 most recent entries on my index page, with a listing of links to the 10 that came before that in my left-hand nav column.

OR, I'd like to have the 5 most current entries on the index page, with a "view previous 5 entries" link on the bottom of the page...it would be great if I could accomplish either of those two things without having to rely on posting dates.

(great software, btw.  loving it.)

Greg
Tuesday, August 05, 2003

*  Recent Topics

*  Fog Creek Home