Bricklayer allows any plugin or template tag handler to use it's templating engine. This means that plugins or handlers can run the templater on a template for their own purposes. I use this feature for the include tag handler and for tags that contain additional template text inside them. I will discuss the importance of that in the Templating API chapter. There are two different methods that Bricklayer provides for using the templating engine. ->run_sequencer($templatetext, $tagid, $paramsref) and ->run_templater($templatefilename, $tagid, $paramsref). run_sequencer runs the templater on the text provided and run_templater opens the specified file name and runs the templater on it's contents. The file name is given relative to the templates directory of the Bricklayer install location. The tagid is the identifier for you template tags. You can use different values for the identifer for multipass templating if you wish. The if this is undefined then it defaults to BK. The paramsref is a reference to any parameter you might wish to pass to all the template handlers.
Jeremy Wall
2006-08-21