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.
Traduction du billet 'patBBCode describers meet patTemplate' de php-tools: J'ai ajouté le Driver patTemplate à patBBCode: ce driver utilise un fichier ou des templates pré-chargés patTemplate pour générer le guide de balises. Gros avantage: le contrôle
Tracked: Dec 06, 14:25