|Those images and captions above are dynamically composited--automatically--from the folder contents. (Note also the Previous and Next buttons are now present in the Detail Viewer, and as before, the lifetime of the viewer is managed based on web-page state.)
Now, adding images to a gallery is a trivial matter of uploading to its directory, the various-sized images and the text files containing their captions. If I don't like the default, file-system ordering, I can sort them by assigning an ordinal to each file name, thereby determining the ranking of the thumbnails. The server does all the work of arranging the page.
As proof of concept, I have implemented this improved, next/previous detail viewer, as well as the auto page-compositor, on several most recent Burning Man pages (and on several live, off-site galleries.) In addition, I have completed a vacation trip gallery that will make use of these features, as soon as I have gathered and processed enough photos. To aid the workflow, I have also dramatically simplified the thumbnail/preview processing stage by creating Photoshop action macros which I have converted to droplets so now, content generation is accomplished by a mere drag-and-drop of the full-sized image files.