Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

Multipage article list


Is it possible, when you have a certain amount of articles, to split them across several pages, ie if you have 25 articles could you have a 3 page index with 10 articles on each page.

I know you can specify a certain number of articles in the for each loop structure, but this will only show the first x amount of articles. Could I have another page that starts where the first page left of, say at article 11 for example instead of article 1?


Mike M
Tuesday, July 23, 2002

Not directly. The most common workaround (also in this forum) is to have a index page with the 10 or so most recent articles, and a complete archive.

Adriaan van den Brand
Tuesday, July 23, 2002

This is sort of related:

Has anyone developed a technique to get your articles to list in two columns, side by side? Sort of like 'snaking columns' in a newspaper.

I'd like to do this in the "Full Article List" section of this page:

Suggestions are greatly appreciated!

Darren Collins
Tuesday, July 23, 2002

I don't know a way to do this in Citydesk, but with a little help I think it is possible:

Check out :  'dividing text over cols'  (PHP)  'is it possible to auto-flow text, column to column?'(PHP) (javascript solution)

Adriaan van den Brand
Wednesday, July 24, 2002

I am not sure if you are trying to put to different articles in two columns, or if you are trying to "snake" a single article into two columns.  If you do this I think you might want to keep the column length to a single screen.  If you don't, you force your reader to scroll down then up.  With a newsPAPER, that's not so hard, but with a mouse it could be a bit annoying

Joel Goldstick
Wednesday, July 24, 2002

Joel you struck a cord with me.  Last night I had to take a newsletter in a word document and publish it on the web.  The document was in 3 columns and it just drove me nuts trying to read it.  It ended up in one column on the web page.

Still, there are probably some good reasons to do arithmatic in foreach scripts.  I've want to publish lists in batches of 5 articles just to make things easier to read.

Wednesday, July 24, 2002

Joel, it doesn't sound like you looked at the page I referenced, but I wasn't that clear either. I want to create two (or maybe three) columns of hyperlinks, just containing the article titles. I'd never try to snake an article over two columns, as that fundamentally violates the web user model (i.e. it's a pain in the ass for readers!).

I'm thinking at this stage that it might be easier to add keywords to the articles, and use two separate loops to build the two columns of articles based on themes or categories. Sort of like this page:

By the way, thanks for your suggestions Adriaan. They seem a little complex for what I want to do - I just want something simple. Maybe CityDesk 2.0 will have something for me :-).

Sorry to hijak your original thread, Mike. I think the only way to achieve what you want is to either use keywords in every article to group them into pages, or design each index page to grab all articles that fall between two dates. Neither approach is terribly flexible or convenient, though. Is there a reason you don't want them all on one page?

Darren Collins
Wednesday, July 24, 2002

Darren, I'm trying to write an Estate Agent site, and what I didn't want was if there happened to be 200 properties, for all of them to be listed on a single index page.

This would look messy and could take a while to download if all the properties contained a picture on the index and would probably scare the end user to death (information overload, think I'll leave this site and try another).

Having done some more work on the site, I'm splitting all the properties into 7 or 8 price bands to give me 7 or 8 index pages.  Even on a site with 200 properties, if they were split across the 8 price band index pages, that gives only 25 properties per index page, which is more acceptable.

What I also may do is use some dhtml to group the properties on the index page into groups of 10-12 and use some javascript to show/hide the groups allowing me to *simulate* the feel of a multi page index.

The type of thing I was looking at trying to do incase It's not clear is something like a google results page.  You get 10 or so results, then click on next to get the next page.

Obviously this is produced dynamically but it is the type of thing the visitor is probably used to.

I think this may be turning into a feature request to allow you to specify a for each block that would automatically span multiple pages and insert all the naviagation for you.
I'll be asking for CityDesk to be making coffee next !!


Mike M
Friday, July 26, 2002

My main feature request would be enhanced scripting, and I think this wish is clearly recognized by the Fogcreek team.  Then I can add the coffee-making (and news-paper coloms and navigation etc.) myself!~

Adriaan van den Brand
Tuesday, July 30, 2002

*  Recent Topics

*  Fog Creek Home