textpattern gallery demo

The new images tag also allows multiple images in the article-image field. In this case I’ve assigned three images (as a comma-separated list) and dropped the tag straight into the article body:

<txp:images break=""><txp:thumbnail /></txp:images>

Admittedly there’s not much point to using the article-image field in combination with an images tag inside the article body; you could just as easily use the id attribute to assign the images. I just did it this way to show how you can indeed use images in an article body. Normally for article images you would put the images tag in the article form.

As of 4.3.0 the images will be sorted according to the sort attribute, not by the order you list them in the article-image field, so at present there is no standard way to preserve an arbitrary sort order.

Again, easy to use this in conjunction with your favorite javascript-based lightbox, slideshow, gallery, etc., which I am too lazy to do for this demo. For those scripts triggered by assigning a rel attribute to a linked thumbnail, the thumbnail tag has a link_rel attribute. Saves you the trouble of building out HTML tags from scratch.

please no width/height attributes

Fans of relative image sizing will be glad to know that Txp image tags can now be convinced to dispense with height and width attributes in the HTML output. image, thumbnail, and article_image do this if you declare height="0" width="0" in the tag attributes.