93 Photo Street


Template Frequently Asked Questions

Templates are text files containing instructions for how to turn the photo map in 93 Photo Street into a web site.
Absolutely not. There are pre-made templates included with 93 Photo Street which you can use to generate web photo maps without knowing the first thing about HTML. Templates are there for users who want to generate specialized web sites and are willing to dive into the dark guts of the web.
93 Photo Street ships with version 1.4 of the Apache Project's Velocity template engine. To learn more about this excellent toolkit, check out their documentation pages:
Once you've skimmed the documents listed above, copy an existing template set and read through its various files until you get a feel for what is going on. Then, make a few changes, build, and see if the results are what you expected. Like HTML, you can view the source of template sets you like and learn from them how to produce your desired page.
Your templates are stored in the "Templates" folder which is in the same place as the "Sites" folder where 93 Photo Street places your new web pages. From the build panel, click the "Browse" button and then look up two folders until you see "Templates".
New template sets are created by placing a new folder in the "Templates" folder. To copy an existing template, just make a copy of its folder with another name and place it in the "Templates" folder. To install a downloaded template, unzip the downloaded file and place the resulting directory in the "Templates" folder. You must restart 93 Photo Street for changes to take effect.
A lot of the look and feel of web photo maps is encoded in CSS and HTML in the template files. Don't be afraid to look in the templates for tweaks which might improve your online photo map.
In each template folder there is a subfolder called "static". Files placed in there will not be evaluated by Velocity, but they will be copied into the build directory's "static" folder.
93 Photo Street watches for certain file name patterns and uses them to generate multiple files for images and locations. The best way to see how this works is to look at an existing template, but here is a description of the process:

For locations, the template name must start with "location" and contain a capital "L". 93 Photo Street replaces the "L" with the index number of the location. For example, if our template file was named "location-wideView-L.html" then 93 Photo Street would create files "location-wideView-1.html", "location-wideView-2.html", location-wideView-3.html"...

For images, the template name must start with "image" and contain an upper case "I" and an upper case "L". As you might imagine, the "I" is replaced with the index number of the image and the "L" is replaced with the index number of the location in which the image is found. For example, if our template file was named "image-L-I.xml" then 93 Photo Street would create "image-1-1.xml", "image-1-2.xml", "image-2-1.xml"...

You can have as many templates for images and locations as you need, so you could have "image-wide-L-I.html" and "image-narrow-L-I.html" to show two views of an image.

all files: map, imageBuilder
location files: location, locationIndex
image files: location, locationIndex, image, imageIndex
The objects which are included in your template context are documented on the Context API page.
Because the velocity template language defaults to starting indices at 1, and to change it would be confusing to people already familiar with the VTL.
Q. Why aren't any images or maps being built in my new templates?
As the template engine is processing your templates, it keeps a list of all of the URLs requested for images and maps of various shapes and sizes. After it has processed all of the templates, it then builds all of the images and maps in the list.
Templates request URLs for images and maps using the functions on the imageBuilder object in the velocity context, which are listed on the context API page.