whump dot com

fetchMessage

This is a Fat Page

This is a Frontier utility script written to fetch the last item of a series kept in a table: such as a message. The idea behind it is to automate the creation of a page which has one piece of content which changes on a frequent basis, such as a journal or log.

Usage

In your website table, create a subtable called #mod. You'll store the 'messages' in this table. The fetchMessage macro will sort this table by name and return the last object in the table. Consequently you'll want to name the objects in #mod using a date scheme, the ISO YYYYMMDD is suggested. There is a script turning Frontier dates to ISO8601 format. You could use that in a script to create entries for the #mod table.

In your web page, plug in the macro:

<H1>Journal Entry</H1>
<p>
{renderObject(fetchMessage())}
</p>

You're responsible for the formatting of the contents.

Changes

Wed, Aug 12, 1998
fetchMessage now returns an object for renderObject() to build. This allows me to embed glossary references in the MOD object.


Last modified on 2/5/99; 6:44:09 PM.
Contact WHUMP dot COM.
Copyright © 1995-2000, Bill Humphries