Template files (.tml) are essentially HTML files, with special tags. Each of these tags will be substituted for dynamicly generated HTML, as shown below. These tags can be used any number of times, and each instance will be substituted.
See the template files included with the album.pl distribution for examples.
| Tag | Description |
| ####TITLE#### | The object's short title. As defined in descriptions.txt. |
| ####DESCRIPTION#### | The object's long description. As defined in descriptions.txt. |
| ####OBJECT#### | The object itself. This is either the photo (for photos), or the list of photos/albums (for albums). |
| ####NAV#### | The navigation bar. (Buttons or text links to next, previous and parent objects.) |
| ####NAVPREV#### | Just the nav button to the previous object. |
| ####NAVUP#### | Just the nav button to the "parent" object. |
| ####NAVNEXT#### | Just the nav button to the next object. |
| ####NAVJUMP#### | Just the drop list for jumping to peer albums. |
| ####STYLESHEET#### | The complete reference to the style sheet. This will substitute with the entire <link rel="stylesheet" type="text/css" href="$style_sheet"> tag. NOTE: This tag must be in the HEAD section of your HTML. |
| ####SLIDESHOW#### | Used to replace the slideshow directive, you really don't need to mess with this. NOTE: This tag must be in the HEAD section of your HTML. |
| ####LEGEND#### | The icon legend, if you elect to show it at all. |
| ####NOTIFY#### | The e-mail notification form, if you elect to show it at all. |
| ####ENTERDESC#### | The form that allows you to enter object titles and descriptions, if you're using "function=enter_desc". |
| ####VIEWS#### | Displays the number of times the photo has been viewed and the date it was last viewed, if using a viewfile. |
| ####RATINGS#### | Displays the user ratings given for a photo, and a link to add ratings of your own. Only present if using a ratingfile. |
| ####ALBUMPROG#### | The web path to album.pl, along with any currently used variables (username, password, debug, function, etc). Meant to be used for linking back to your album. |
| ####FILE=filename.html#### | Automatically inserts the contents of "filename.html" into the template. (Note that it doesn't have to be a HTML file.) Used for SSI like behaviour, common headers/footers, or even nesting templates. |
| ####STOPSLIDESHOW#### | The "Stop Slideshow" button. Only displayed during a slide show. |
| ####STOPDEBUG#### | The "Stop Debugging" button. Only displayed when debugging is on. |
| ####PAGES#### | The multi-page link set. Only displayed when photos_per_page is non-zero, and the number of photos on the current page is greater than that value. |
| ####ADMIN#### | Displays the Administration menu. |
| ####LOGIN#### | Displays "Login" link if not logged in, or user's name if logged in. |
| ####RECENTUPLOADS#### | Displays a link to the "View Recent Uploads" page. |
| ####JHEAD#### | Inserts jhead information. (Displays when viewing photos only) |
| ####OBJECTURL#### | Inserts the URL to the actual picture, for outside references, not HTMLized. |
| ####URL#### | Inserts the URL to the actual picture, for outside references, as an HTML link. (Displays when viewing photos only) |
| ####URLONLY#### | Inserts the URL to this photo/album, as called through album.pl, with no HTML tags. |
| ####PATH#### | Inserts the "path" to the album/photo. I.E. summer2004/vacation/dcm0045.jpg |
| ####STRING=stringnum#### | Automatically inserts the string from line # stringnum of into the file. Strings are read from album_strings.txt by default. |
| ####SIZES#### | Inserts [ Small ] [ Medium ] [ Large ] and [ Full Size ] resizing links for photos. |
| ####DATE#### | Inserts the current date and time in 2002/09/18 19:38:09 format. |
| ####FULLSCREEN#### | Inserts a link to start a fullscreen slideshow, when viewing photos. |
| ####CONFIG=var#### | Inserts the value of the variable "var". For example, inserting ####CONFIG=quota#### will display the current upload quota, and ####CONFIG=loggedin#### will show the currently logged in user's name. |
| ####CODE=command#### | Will execute "command" as part of the script. No output. For example, inserting ####CODE=$::columns=1;#### will change the # of display columns, starting from this point in the tempalte on. Any valid Perl code can be inserted. |
| ####RANDTHUMB#### | Inserts the thumbnail to a randomly selected image in the album. Works best if you have thumbnails.  |
| ####THUMBURL#### | Inserts the URL to the current object's thumbnail. |
| ####HEIGHT#### | Inserts the current photo's height. Requires ImageMagick integration. |
| ####WIDTH#### | Inserts the current photo's width. Requires ImageMagick integration. |