Up and Running with Frontier Web Site Management
by Matt Neuburg
Author of the book Frontier: The Definitive Guide
The authors in their infinite wisdom have provided hooks into the rendering process, effectively giving you the ability to insert UserTalk scripts into that process to customize it. You won't be able to take full advantage of this ability without knowing UserTalk, but you should be aware of how it works, because there are things that happen during rendering that will mystify you otherwise.The hooks are called Filters. Look in myFirstSite.#filters and you'll see there are three. They are scripts, and they are each called with one parameter which is the address of the data table used to collect directives during rendering (usually, this is websites.#data).
firstFilter() is called very early in the process, after table-based directives have been gathered into the data table but before the Web page object has been examined in any way.
pageFilter() is called after directives in your page have been processed and the page has been rendered (from an outline to a string, for example), just before it is embedded into its template; an object called bodytext (in the data table) contains the text of your page, and you are free to modify it as desired.
finalFilter() is called at the very end of the rendering process, after the page has been embedded into its template, macro calls and glossary references have been resolved, and so on; an object called renderedtext (in the data table) contains the text of your page, and you are free to modify it as desired.
If you look inside pageFilter() you will see that in fact it already does something by default.
pageFilter() makes the first letter of your page larger, giving a kind of drop-cap effect. The reason we haven't noticed this in any of our myFirstSite pages is that the first letter of each page (by the time pageFilter() gets hold of it) is the left angle-bracket of an HTML tag, which pageFilter() leaves alone.
Personally, I regard this drop-cap script as a waste of processing time, and I suggest you comment it out (just select the line that says "with adrPageTable^", hit command-backslash [ctl-backslash], and press the Compile button). Indeed, if you make the same change in html.data.newSiteTemplate.#filters.pageFilter(), you will put it into effect for every new site you create.
All text is by Matt Neuburg, phd, matt@tidbits.com.
For information about the book Frontier: The Definitive Guide, see my home page:
http://www.tidbits.com/matt
All text copyright Matt Neuburg, 1997 and 1998. ALL RIGHTS RESERVED.
No one else has any right to copy or reproduce in
any form, including electronic. You may download this material but you may not post it for others to
see or distribute it to others without explicit permission from the author.
Downloadable versions at http://www.ojai.net/matt/downloads/webTutorial.hqx and http://www.ojai.net/matt/downloads/webTutorial.zip.
Please do not confuse this tutorial with a certain other Frontier 5 tutorial based upon my earlier work.
This page created with
Frontier, 2/11/2000; 6:59:52 PM.