This post originated from an RSS feed registered with PHP Buzz
by Stephan Schmidt.
Original Post: 25 patBBCode describers meet patTemplate 13
Feed Title: a programmer's best friend
Feed URL: http://blog.php-tools.net/rss.php?version=1.0
Feed Description: The blog of PHP Application Tools
f4c
I have added the patTemplate driver to the new Describer class included with patBBCode: this driver uses a patTemplate template file or loaded templates to generate the tag guide, leaving nearly total control in layout. The effect can best be seen by comparing the very simple HTML Driver output with the new patTemplate driver output.
In addition to making it possible to let patBBCode render its tag guide automatically directly in your site's design, the patTemplate driver has a series of options you can set, namely:
injectContent: whether to inject the content into the loaded templates directly, or return the rendered list as a string. This is very useful if you want to inject the content directly in place into an existing template your application has already loaded.
sortBy: sorting of the tags list. Possible values are 'tagName' to order by tag names alphabetically, 'attributes' to sort by tags with or without attributes, or set to 'null' to disable completely.
sortDir: sorting direction. asc|desc
containerTemplate: sets the name of the template containing the whole tags list
entryTemplate: the name of the template for each tag
attributesTemplate: the name of the template with the attributes list
variablePrefix: a prefix prepended to all variables in the templates - use if some of the standard variable names collide with existing ones in your application
These changes are currently only available in CVS, so you can view the changes in our WebCVS or download the latest CVS snapshot.
17