Fog Creek Software
Discussion Board

Knowledge Base
Terry's Tips
Darren's Tips

Problem with modified date

I'm so confused.

I put a <p><em>Schedule so far (as of {$.modifiedDate$}):</em></p> on this page (Article A):

I use a script to pull the body of the above Article A to publish on the home page (Article B):

What I expect is that the modfied date from Article B to display in Article A.

It worked on October 14 when I first added the modified date. But when I modifed Article A today, the new modified date did change on Article B.

Friday, October 17, 2003

As long as you have .modifiedDate without anything in front of the dot, CityDesk is going to put in the .modifiedDate of the article it's working on building right now. To get the modifiedDate of article A into article B you could use
{$ foreach 1 x in (fileName "....") $}{$ x.modifiedDate $}{$ next $}

Joel Spolsky
Saturday, October 18, 2003

Yes, the program logic is that it modifies the outside script first - bring the code from Article B in first. Then process the code that's now in Article A.

So when it encounters the {$.modifieddate$} it's currently residing in Article A.
Saturday, October 18, 2003

*  Recent Topics

*  Fog Creek Home