Part of the Clay Basket Website. 7/22/96.

New Gymnastics

I had several requests for a {moddate} macro -- it would display the modification date of the associated text file. As I started to implement this, I realized this was just the beginning. You might want the path to the file, the comment of the file, its creation date, its size, what kinds of resources are in its resource fork. It goes on and on! It's cool, because there's a better answer. Frontier can already do all this stuff.

Solution -- Before running the macros in a page, Clay sets up a new table called clay.page. It has (currently) 16 chunks of information, All the components of the page are available to you.

Most important, I think, for macros is clay.page.inputFile. With this piece of data available to your macros you can do all the moddate type reporting you want. To display the mod date, you say:

{file.modified (clay.page.inputFile)}

Some more experiments --

{file.fileFromPath (clay.page.inputfile)} = Yabbadabba!

{file.folderFromPath (clay.page.inputfile)} = Macintosh HD:Websites:Yabbadabba Website:Input Folder:

{file.fileFromPath (clay.page.outputfile)} = default.html

{file.created (clay.page.inputfile)} = 10/10/95; 8:19:21 AM

{file.modified (clay.page.inputfile)} = 1/24/96; 9:24:48 AM

{sizeOf (clay.page.bodytext)} = 421

This page was built on a Macintosh running System 7.5.3 and Frontier 4.1 and Clay Basket 1.0b7g.

It works!


This page was last built with Frontier on a Macintosh on Mon, Jul 22, 1996 at 10:35:22 PM. Thanks for checking it out! Dave