Frontier Tutorials / Writing Table Renderers / The Easiest Way

The Easiest Way

Remember all the stuff the renderer did when we looked at The Easy Way? Frontier will actually do much the same thing for you if your specified table renderer is an outline instead of a script.

It does this by placing the address of the table to be rendered into the page table, at adrpagetable^.adrTable. The table renderer outline is then processed as the page text, with directives processed and macros expanded. Think of the table renderer outline as the template for the page text, just like the separate template used by the table renderer script in The Easy Way.

In the table renderer outline, you can insert fields from the table by using macros of the form {adrTable^.fieldname}. So, again using the Event example, RenderTableAsEvent might look like this:

<table>
space picture<tr valign=top>
space picture<td><b>{adrTable^.date}</b></td>
space picture<td>{adrTable^.name}</td>
space picture</tr>
space picture<tr>
space picture<td><b>Time</b></td>
space picture<td>{adrTable^.time}</td>
space picture</tr>
space picture<tr>
space picture<td><b>Contact</b></td>
space picture<td>{adrTable^.contact}</td>
space picture</tr>
space picture<tr>
space picture<td colspan=2>{adrTable^.directions}</td>
space picture</tr>
</table>

And finally, a bit about the author!

Tutorial Contents
Writing Table Renderers
What Is A Table Renderer
Anatomy of a Table Renderer
The Hard Way
The Easy Way
The Easiest Way
About the Author