Variables

Revision as of 27 June 2014 16:25 by sannanordgren (Comments | Contribs)

The web pages jAlbum generates are based on "template pages" which can contain HTML and CSS code mixed with special tags, scripts and variables that are expanded to their values. When referring to a variable in HTML context, use the format ${variable}. In scripting context or when used in existence testing (see ja:if exists on the [tags page]) simply use variable name as is.

Template file variables

The following variables are defined. Note that case is significant:

Name Explanation
albumDescription Description for the entire album. Picked from the root folder's description
albumHeight Album height in pixels. (Set when embedding album). Since v10
albumWidth Album width in pixels. (Set when embedding album). Since v10
albumURL Album address. Only available when processing "embed.htt". Since v10
albumTitle Title for the entire album. Picked from the root folder's title
cols Number of image columns on index pages
currentRows Number of image rows on current index page
executedNormally Set to true after successful (not aborted or error) album generation. Can be referred to in finally.bsh
generator Name and version of jAlbum
generatorUrl Address to the jAlbum homepage
homepageAddress Address (URL) to the album owner's home page (v10.8)
homepageLinkText Anchor text for home page link (v10.8)
imageNum Number of the current image within an album
indexImageCount Number of images on current index page
indexNum The number of the current index page1
internalVersion Internal version number
language Define as user defined variable to explicitly set a language for a multilingual skin (ISO two character language code)
level Level of album directory (0 meaning root level)
maxImageWidth Max image width as set by user
maxImageHeight Max image height as set by user
maxThumbWidth Max thumbnail width as set by user
maxThumbHeight Max thumbnail height as set by user
rows Max number of image rows on index pages
skin Name of current skin
style Name of current style sheet
description Description for album directory
totalIndexes Total number of index pages1
totalAlbumImages Total number of images in an album (subdirectory images included)
totalImages Total number of images in a directory
textEncoding Character set and encoding of generated pages and comments