Templates (and making things elegant)

Paul Howson phowson-lists at flexi.net.au
Tue Jul 17 16:47:17 PDT 2001


Anthony Green <tony at rarepleasures.co.uk> wrote:

> The template uses 3 columns and on each page the content of the the three
> columns can change (or not) so the template is defined...
> 
> <td>{bodytext}</td>
> <td>{html.processMacros (string (menu_m))}</td>
> <td>{html.processMacros (string (menu_r))}</td>
> 
> Then at the top of each page I define the directives thus:
> 
> #menu_r "{html.processMacros (string (contact))}"
> #menu_m "{html.processMacros (string (competition))}"

[snip]

> I was wondering if anyone had a more elegant solution.
> Also is it possible to store data in a custom table instead of #tools or
> #glossary
> 
> How can I for instance create a table of biographies and still use the macro
> replace or glossary feature ?

Why not make special tool scripts which generate your contact and
competition text. Then your template would just say:

<td>{ContactInfo()}</td>
etc

Your script ContactInfo would be in the #tools table. It could then do
arbitrary processing. It could call on content anywhere in the Frontier ODB
--- so you could indeed create special tables to hold information (such as
biographies) and then have special #tool scripts which know how to extract
that information and assemble it for insertion into the template.

Don't be too constrained by the so-called "correct" ways to do things in
Frontier's web site framework. You are free to extend it in any way you
like. It's very, very flexible.

----------------------------------------------------------------
Paul Howson
The Design Group Qld, Warwick Qld Australia
web: www.tdgq.com.au  email: paul at tdgq.com.au





More information about the Frontier-Users mailing list