title: Optional Plugins
subject: Optional PubTal Plugins.
Plugins can be used to add support for additional content types or upload methods. Several plugins are installed by default, and the content types that they provide are described elsewhere in this manual.
Several plugins are provided that are not installed by default, but included with PubTal in the "optional-plugins" directory. These are documented here.
<li>pytextile.py - This plugin provides support for <a href="http://www.textism.com/tools/textile/">Textile</a> and requires <a href="http://diveintomark.org/projects/pytextile/">pyTextile</a> and Python 2.2 to be installed.</li>
<li>abiwordContent - This plugin provides support for using the AbiWord application to author web pages. AbiWord has in the past saved corrupted files, so use with caution.</li>
<li>CSVPlugin - Provides support for generating multiple web pages based on the contents of a .CSV file.</li>
The pytextile.py plugin provides support for the Textile content type. In addition to the properties listed in the <a href="../conf/templates.html">Template Basics</a> section, Textile content also generates an additional property: rawContent.
This is available on the page object (i.e. the TAL path is page/rawContent), and holds a copy of the Textile content in its unparsed form.
The abiwordContent plugin provides support for the Abiword content type. In addition to the properties listed in the <a href="../conf/templates.html">Template Basics</a> section, Abiword content also generates an additional property: footnotes.
This is available on the page object (i.e. the TAL path is page/footnotes), and holds a list of footnotes. These can be used in a template as follows:
<div tal:repeat="footnote page/footnotes" tal:replace="structure footnote">Foonotes go here</div>
This is a complex content type provided by CSVPlugin. The plugin registers the file extension *.csvst as containing CSVSortedTables content. The file format of the *.csvst file is similar to that of the PubTal site configuration file, i.e. directives with options. The file defines a source CSV file that contains comma separated values, with the first row in the file being the name of each column. The file then goes on to define the pages that should be produced based on the CSV file, including any sorting that should be applied to the data.
Here is an example of a *.csvst file that demonstrates all of the options available:
header title Employees sorted by Name
header title Employees sorted by Level, then Name
value VP 0
value Manager 1
value Team Lead 2
The source-file option <b>must</b> come first, and specifies the source CSV data file (relative to the *.csvst file). The <Page <i>pageName.html</i>> directives can contain header options that define name-value pairs. The <i>pageName.html</i> is the exact name of the page to be generated.
The <sort <i>column-name</i>> directives must be nested within the <Page> directives, and define how the data should be sorted. The order of the <sort> directives defines which column is sorted first. Within the directive two options can be used: value and empty-value. The value option is used to map a column value to a sort priority; the lower the priority the higher up in the list it appears. The empty-value option defines the sort priority to use for an empty value. If no options are specified the column will be sorted by alphabetical order.
The CSVSortedTables content type provides the CSV data through page/content as a list. To access column values for a particular row use the name of the column. As an example the template for the employee csvst file above could be:
<th><a href="employeesByName.html">Employee Name</a></th>
<th><a href="employeesByLevel.html">Employee Level</a></th>
<tr tal:repeat="employee page/content">