Chapter 4. Templates guide: How to create and edit templates for Fanurio

This guide shows you how to create or edit templates that you can use to export documents like invoices.

4.1. Getting started

Whether you love using Microsoft Word for writing your documents or you're an experienced designer who enjoys using Adobe Dreamweaver to create HTML pages, you'll find it very easy to create templates for Fanurio.

In most cases, you can use a visual editor (Microsoft Word, OpenOffice, Adobe Dreamweaver, KompoZer) to control the layout of the template. For content, you need to use placeholders and a certain template syntax. The next section explains the template language so that you can use it to produce documents with the content you need.

Fanurio can handle templates in several file formats like HTML, Microsoft Word 2007 or OpenDocument Text. However, HTML is the recommended format for templates in Fanurio. You can find a list of all supported file formats with comments on each one of them at the end of this guide.

If you create templates in HTML or any other format, it's important that you read the template language section and the section on how to use directives in tables.

4.1.1. Creating an invoice template in 5 minutes

The fastest way to create an invoice template is to configure the default template visually.

  1. Go to File » Create Template to see a sample invoice displayed using the default template.

  2. Check one or more options and then click Update to see how the invoice looks like.

    Among the things that you can configure are your logo, the columns of the invoice and the time log of service items.

  3. Click Save... to save the template to the templates folder when you're done. Later, when you'll want to export an invoice to HTML, you can use this template.

If you want to make further adjustments to the new template, go to File » Show Templates » Invoices to locate it and then open it with a visual editor like Adobe Dreamweaver or KompoZer.

If you have problems customizing or creating a template, you can always contact us for help.

4.1.2. Installing a template

Installing a template is just a matter of copying one or more files to a certain folder. Go to File » Show Templates to open the folder where you want to install the template. For invoice templates, use File » Show Templates » Invoices.

If you are using an HTML template that uses specific fonts and images, make sure you also copy those files to the templates folder.

4.1.3. About Freemarker

Fanurio uses the FreeMarker template language for its templates. Freemarker is a powerful and mature template language that can be used to create both simple and complex templates. FreeMarker can be used to generate any kind of text: HTML, XML, RTF, etc.

This guide doesn't cover all FreeMarker concepts but only those that are absolutely necessary. For a detailed guide on the FreeMarker language, go to http://freemarker.sourceforge.net/docs/dgui.html.