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.
The following variables are defined. Note that case is significant:
1 Not defined if only one index page exist
2 Only defined if such page exist
3 Only exists for images containing EXIF/IPTC data and if EXIF extraction is turned on
You can list these variables and their current values by writing the following into a slide.htt template file:
<pre><%=current%></pre>
Apart from having access to ordinary variables when scripting, Jalbum also provide some special objects (Java type within parenthesis):
fileVariables.get(files[imageNum-1]) (Map)Note: "current", "previous" and "next" are accessible for slide pages or within a ja:coliterator or ja:fileiterator on index pages
The "meta" object usually contains more EXIF metadata than accessible from ordinary variables, but possibly in a more raw format. You may list all metadata found inside an image by putting the following code inside a slide.htt file:
<pre>${meta}</pre>The following example picks the "Owner Name" variable out of the meta object (assuming it exists, which it does for some Canon cameras):
${meta.Owner Name}Template file variables can be used anywhere where you can put text and html tags (HTML mode) and within <% scriptlets %> (BeanShell mode). In HTML mode, you have to add a dollar sign ($) in front to indicate that this is a variable, in BeanShell mode this is optional but there is another difference: It is important to understand that $variables gets expanded to their value before script execution begins (compare this expansion to a search and replace operation in a text editor). This means that a script cannot change the value of a $variable, but it can change the value of its "shadow" variable (same name but without the dollar sign). The "shadow" variable can later on be referenced from HTML mode like this: <%= variable %>
Jalbum users can define new variables using the "User defined variables" table in the advanced section. These variables behave like other skin template variables and can also override existing variables. You can use user defined variables to add even more flexibility to the look of the skins you create. Usually, user defined variables become variables of String type nomatter what value they have (for backward compatibility). This isn't very convenient if you wish to work a lot with boolean or integer variables (requires type conversion). Automatic type conversion to boolean, integer and double is however performed if Jalbum senses that the particular skin has a custom user interface (see below).
Jalbum has a mechanism to simplifiy writing skins that support texts in several languages (usually navigation strings like "Next" and "Previous" etc). Look at this example:
$text.previousPage
Given the example above, Jalbum will look for a mapping for the "previousPage" "key" in the current language of the user running Jalbum. Jalbum will look into certain property files (see top of page). The format of such a file is simply a list of key=value mappings, one for each row. Please see the "standard" skin for a full working example. Here is a sample Swedish property file (texts_sv.properties):
up=Upp en nivå previousPage=Föregående sida nextPage=Nästa sida firstPage=Första sidan lastPage=Sista sidan atFirstPage=Det här är första sidan atLastPage=Det här är sista sidan indexPage=Till index sidan originalImage=Originalbild cameraInfo=Kamerainformation
To support a new language, say German, simply copy and paste such a file, rename it to texts_de.properties and translate the text strings inside. Note: You can force the use of a certain language by setting the "language" user defined variable to an ISO two character code that the current skin has support for.