7. Template files

Template files are used and required to build (X)HTML pages. fpgg needs a template file for index, and view page, and if picture categories are defined, for category index. fpgg expects to find index.template, view.template, and category.template in work directory, respectively.

Template files usually contain valid (X)HTML base for generated pages, but may contain anything. Each recognized tag is expanded according to the tag. If unrecognized or unsupported tags are used in templates, they will also appear in final document. All tags are written as <TAG:name:option...> or <*TAG:name:option...>, where name is the tag name, and each option is separated from tag name or previous option with a colon (:). If tag name in template file is preceeded with an asterix (*) and the tag has no value set (by fpgg), the whole line will be deleted from output. For example, if picture has no map link set, the following line in template file will not be included in output at all.


<div class="map"><*TAG:PICTURE-MAP></div>

7.1. General tags

TITLE

Title given by command line option. --title.

LINK-INDEX:label

Will create a link to main index page. If given, label is used as link's label.

TOTAL-PICTURES

Number of pictures in whole gallery.

CREATED

Date of (X)HTML page creation.

ALL-THUMBS

Replaced with links and thumbnails to every picture in gallery. Can generate a big chunk of (X)HTML. Usually only used on an index page.

ALL-CATEGORIES

Replaced with links to each picture category. Usually only used on an index page.

7.2. Category index page tags

CATEGORY

Category name.

CATEGORY-THUMBS

Replaced with links and thumbnails to every picture in category. Can generate a big chunk of (X)HTML.

7.3. View page tags

VIEW-LINK-PREV:label

Link to previous picture in gallery. If given, label is used as link label.

VIEW-LINK-NEXT:label

Link to next picture in gallery. If given, label is used as link label.

PICTURE-FULLPATH

Full path to picture.

PICTURE-FILE

Filename of picture.

PICTURE-PATH

Path to picture (without picture file name).

PICTURE-TITLE

Picture title from user given information. See info-file tag title.

PICTURE-DESCRIPTION

Picture description from user given information. See info-file tag text.

PICTURE-MAP:label1:label2

User given link to online map. If given, label1 is used as label for precice map, and label2 for approximate map. See info-file tag map and map-ap.

PICTURE-MAP-LINKS:label1:label2

User given coordinates of photograph location. Tag will be replaced with a label and link(s) to defined online map service(s). If given, label1 is used as label for precice map, and label2 for approximate map. See info-file tag coords.

PICTURE-CATEGORIES

Links to categories this picture belongs to. See info-file tag category.

PICTURE-I

Number of this picture. Always within range of 1 -- TOTAL-PICTURES.

PICTURE-VIEW

Replaced with the view picture.

PICTURE-VIEW-LINK-ORIG

Replaced with the view picture, with link to original (unprocessed) picture.

PICTURE-VIEW-LINK-NEXT

Replaced with the view picture, with link to next picture in gallery.

PICTURE-LINK-ORIGINAL:label

Link to original (unprocessed) picture. If given, label is used as link label.