banner
Advertising


Lightroom-News.com
LRN Contents
Calendar
LRN Archives
Meta
RSS Feeds


Lightroom-News.com

The lastest news and info about Adobe Photoshop Lightroom


August 27, 2008

Anatomy of a Lightroom HTMl Gallery

Lightroom HTML galleries used to be written in a mix of XSLT and XML. The simpler coding in Lua makes it a pleasure to create HTML galleries with. You can write Flash galleries in Lua, but because IE doesn’t allow plugin loading on PC Lightroom, you can’t see them in the preview window. Hence 3rd party Flash galleries use the old method for cross platform compatibility.

Lua galleries were introduced in Version 1.3 and have matured somewhat with V2.0. The new syntax is much tidier and more compact. In fact Matthew Campagna shaved 500 lines off one of his galleries for version 2, and my new website in a gallery LRB Portfolio managed close to that also. Much kudos to Andy Rahn for this.

So what comprises a Lua Gallery? Well the absolute minimum a gallery can contain is 3 files: galleryInfo.lrweb, manifest.lrweb and a HTML file. Let’s look at them in a little more detail:

galleryInfo.lrweb: This is the heart of the gallery and the file Lightroom uses to define the internals of the gallery and the contents of the panels in the Right panel. In this file you define the control variables, the checkboxes, the sliders and all the other controls of the gallery. You can create custom style sheet through the code here (however, it’s not truly a Cascading Style Sheet as it doesn’t output in your assigned order).

manifest.lrweb: This file tells Lightroom what files to include with the gallery, along with the HTML pages used. You can include image files, CSS files, Javascript files and others with this file.

HTML file: This is the base file for the gallery. It makes calls to variables defined in galleryInfo.lrweb and the custom.css file that is created from it.

The mix of all three is what builds the gallery. You can add your own CSS files and site HTML to the HTML and easily integrate it into your current site design. We’ll be looking at this in more detail in future posts.

In the next post, we start looking at galleryInfo.lrweb in more detail.

4 Responses to “Anatomy of a Lightroom HTMl Gallery”

  1. BCLS says:

    This new configuration seems to result in “unknown errors” when I try to upload galleries. The same Gallery exported and uploaded with SimpleFTP worked out just fine.

  2. Sean McCormack says:

    The FTP in Lightroom has nothing to do with the gallery type. It’s a simpler FTP with less error correction than a dedicated FTP program. And nothing to do with my post.

  3. peppino says:

    Thanks for this info Sean! Andy mentioned that they are working on the LUA for flash galleries and im looking to switch all mine over when that happens. I am not familiar with LUA so your postings will be a great help. Thanks!

    joe
    lightroomgalleries.com

  4. Sean McCormack says:

    Hi Joe,
    It’s beyond the bounds of the tutorials I’ll be doing, but you can create galleryType=”flash” galleries. It just has to use the Lightroom SWF and XML, which of course isn’t much good for custom flash like you or I would create.

Leave a Reply

You must be logged in to post a comment.