textpattern gallery demo

This simple photoblog features thumbnails linking to individual blog posts, each of which has the full-size image plus some text fields: a title and text for the blog post plus an image caption. It’s based on articles and the article image field. Compared to the category-based galleries it’s an extra step to create an article for each image, but it gives you lots of extra text fields to play with, user commenting if you like that sort of thing, and all of the additional sorting and combining options that come with Txp article lists.

The thumbnail nav comes from an article_custom tag:

<txp:article_custom section="photoblog" wraptag="ul" break="li" class="thumbs">
    <txp:permlink><txp:article_image thumbnail="1" /></txp:permlink>
</txp:article_custom>

Each thumbnail links to its corresponding full post, which uses this article form:

<h2><txp:title /></h2>
<txp:body />
<txp:images>
    <txp:image />
    <p class="caption"><txp:image_info /></p>
</txp:images>

Note the use of images without attributes. Used this way in article context it automatically picks up the article image.

And note the image_info tag. This gives access to all image fields; used without attributes it defaults to caption.