8. Customization

The customization of the FRED mainly concerns the generated announcements, notifications and exported PDFs.

8.1. Email templates

Email templates are located in the database tables mail_type (email subject) and mail_template (email body).

We recommend to replace the Czech variant of texts with the variant in your language and keep the English variant for common understanding.

Texts are processed with the ClearSilver tool which takes a template and passed parameters and creates the resulting email text.

There is a set of parameters which are passed to all emails (defaults.*) but the passing of other parameters depends on the type of email. For a detailed reference of the passed parameters according to email type see ClearSilver parameters reference.

8.2. PDF templates

The Portable Document Format (PDF) is used for many documents exported by the system such as letters (expiration warning), invoices or the portion of public requests delivered by post.

These documents are rendered by the fred-doc2pdf script from RML (Report Markup Language) which is an XML-based intermediary format for PDF rendering.

Intermediary RML files are constructed from dynamic XML data (generated from the database) and static strings stored in XML files in the same folder as templates. Standard XSLT templates and an XSLT processor are employed to construct these intermediary files.

The templates (.xsl) can be found in the directory @PREFIX@/share/fred-doc2pdf/templates/.

The static strings (.xml) are available in Czech and English localizations and the localization is selected in each template with the lang parameter.

The easiest way to customize PDFs is to adapt the headers and footers to match your corporate identity (logo and graphic design). The default design (used in CZ.NIC) is in the cznic_design.xsl template which is imported into the other templates.