TTG CE2 Auto Index Setup & Usage

TTG CE2 Auto Index is used to create gallery indexes. While TTG CE2 Pages creates only one gallery index, TTG CE2 Auto Index may be used to create any number of gallery indexes.

Uses of the Auto Index

Typically, these indexes may be used in any of the following ways.

A Standalone Index

For users not using TTG CE2 Pages, TTG CE2 Auto Index may be used as a standalone gallery index for your image galleries. This use is common when using TTG CE2 Auto Index to supplement an existing website, or when users with to maintain their image galleries separately from their main website.

A Secondary Index

Users of TTG CE2 Pages already have a main gallery index, the Galleries page created by TTG CE2 Pages. However, some users may wish to publish one or more additional gallery indexes. For example, the main index may be used to organize a permanent portfolio, while a secondary index might be used for more transient galleries of recent work.

Another secondary use of TTG CE2 Auto Index may be to create a Videos gallery or Retouch gallery.

Typically, a secondary index will exist as a top-level index alongside the Galleries page and will occupy a space in the main site navigation.

A Child Index

A child index is a gallery index that is nested within a higher-level, parental index, and is often used to establish categories of organization. For example, the main gallery index may contain child index for Travel; the Travel index then contains individual image galleries for Italy, France, Spain, etc.

In use, the main index (the parent) leads to another index (the child), which leads to an image gallery. Such an effect is achieved by nesting folders each within the other, for example:


In this example, /galleries/ is the location indexed by TTG CE2 Pages' Galleries page, our main index. The /travel/ folder is created by TTG CE2 Auto Index and placed within the /galleries/ folder. The /italy/ folder contains our image gallery from Italy, and is placed within the /travel/ folder.

Thumbnail Images

When creating your auto index, select a handful of images for your filmstrip which represent the planned content of your index. Thumbnails serve two purposes in TTG CE2 Auto Index, one of lasting importance and one ephemeral.

Thumbnails in Child Indexes

When a child index is listed within its parent, the thumbnails exported alongside the child index will appear within its listing in the parent. Therefore, if creating a child index for Travel, you should populate your filmstrip with a small group of images representing your travel galleries. When the child index is listed in the parent, one of these images will be selected at random to represent the child.

Thumbnails in the LR Preview

While designing your gallery index within Lightroom, the images in your filmstrip will be used as ephemeral representations of indexed content. The items you see listed in the index within Lightroom are for design purposes only, and will not appear in your exported gallery index (which wil be empty until you add real image galleries).

Adding Galleries to a Published Index

The purpose of the auto index is to make the task of adding image galleries to your site an easy one.

TTG CE2 Auto Index will automatically detect supported gallery types residing in the index’s folder on your web server. To add a gallery to the index, export the gallery from Lightroom, then upload the image gallery folder into the index folder on your server via FTP. For more information on using an FTP client, see the article File Transfer Protocol (FTP).

Because we are uploading galleries to the web, we should keep some basic naming conventions in mind. Gallery folder names should not include spaces or punctuation. Naming your gallery folders properly is important for index functionality. Web folder names should not include spaces, nor any punctuation. Allowed exceptions are hyphens ( – ) and underscores ( _ ), which may safely be used in folder names to replace spaces.

Manually Adding Galleries

TTG CE2 Auto Index is not limited to indexing supported gallery types. Other galleries, or any other type of media, can be added to the album index manually.

The album index will create entries for any nested folder containing an autoindex.xml file and a /thumbnails/ folder containing thumbnail images. The XML file should be formatted as follows:

<?xml version="1.0" encoding="UTF-8"?>
   <thumbnail>Path to thumbnail image</thumbnail>
   <title>Album Title</title>
   <description>Album Description</description>
   <url>Path to content</url>

The autoindex.xml file can be created manually using a plain text-editor, or can be created using Lightroom with TTG XML Maker. To better understand how to use the XML file, see Understanding Auto Index Behavior, below.

Understanding Auto Index Behavior

To make the most of TTG CE2 Auto Index, advanced users may want to know how it works.

On load, the album index searches through all of its sub-folders to a depth of one level. For each folder in which it finds an autoindex.xml file, it will create an album entry. The album entry will be created according to the following guidelines:

1) If a thumbnail image is specified, that thumbnail will be displayed. If no thumbnail is specified, the album index will select an image at random from the /thumbnails/ folder contained within that sub-folder. If no thumbnails exist, the album item will display a default thumbnail image.

When specifying a thumbnail image, the thumbnail path should be written relative to the image gallery root, usually in tihe format thumbnails/filename.jpg.

2) If a title is specified, that title will be displayed. If no title is specified, no title will be displayed.

3) If a description is specified, that description will be displayed. If no description is specified, no description will be displayed.

4) If a relative or absolute URL is specified, the album entry will link to that URL. If no URL is specified, the album entry will default to the sub-directory. The browser will serve index.html or index.php by default. If no URL is specified, and no index file exists, the album entry will probably lead to a Page Not Found error.

5) Detected image galleries will appear in the index listed in numeric, then alphabetic order ( i.e. 0 – 9, then A – Z ), the same way that a system folder would sort by name on your computer. You may control the list order of your galleries by naming your folders to list in the desired order. Display order may be reversed; see below.

Reversing Album Order

Album list order can be reversed by opening the /resources/autoindex/autoindex-view.php file and changing the boolean value of $reverseit on line 12.