Fog Creek Software
Discussion Board




Knowledge Base
Documentation
Terry's Tips
Darren's Tips

how to do this?

I would like to do a bit where I can list all _other_ articles by the same author.. ie. you are reading one article and at the bottom you can see all the other articles by the same author

Originally I thought I could use conditions in the if statement (logical right?) but no they only work in the foreach statement (illogical - the coding must be the same)

anyone found a work around?

bret watson
Thursday, January 01, 2004

Bret, you are really giving it a work out and discovering all those "almost there" features: The stuff you can't see in an extra field, script shortcomings, and in particular locating errors during the publish.

This one, pulling related articles (or articles by the same author) is a much requested feature. You can make it happen with a little brute force - with a variable for each author containing a script, or an "include" type article. But so far you can't make it automatic, or even semi-automatic with CityScript.

tk
Thursday, January 01, 2004

Would this work:

{$ forEach x in (and(author "John Doe")(not(thisArticle))) $}

Timo Virkkala
Sunday, January 11, 2004

Oops. The problem was to avoid hardcoding the author's name. So that one doesn't work.

Back to the drawing board.

Timo Virkkala
Sunday, January 11, 2004

*  Recent Topics

*  Fog Creek Home