images
The images tag is a single or container tag that Textpattern will use to gather a list of matching images uploaded via the TXP Images (panel). Utilising the other image tags in the suite image_info, image_url, image_date and if_thumbnail) you can display simple image galleries from this list.
If used as a container tag, it must be specified as an opening and closing pair of tags, like this:
<txp:images>
...contained statements...
</txp:images>
This is equivalent to putting the contained statements into a form named “my_form” and using <txp:images form=“my_form” />.
By default, the tag is context-sensitive, which means that in the absence of any other filter attributes (id, name, category, author, realname, extension, thumbnail), it will grab a list of image IDs from the currently viewed article’s article_image field. If it finds nothing there, it will check the URL to see if there is a category list in progress. If it finds nothing there too, the tag will display nothing. See the auto_detect attribute for further information.
attributes
id="unset" (integer)
name="unset"
category="unset"
author="unset"
realname="unset"
extension="unset"
thumbnail="unset"
label="unset"
labeltag="unset"
wraptag="unset"
html_id="unset"
class="unset"
break="br"
limit="0" (integer)
offset="0" (integer)
pageby="unset" (integer or "limit")
sort="name asc"
form="unset"
auto_detect="article, category, author"
genealogy
Version 4.3.0
Default usage
<txp:images />
Uses the current article image field as a list of image IDs. If the article image field is empty, it contains names/URLs, or the tag is used on an article list page, it returns no images. If, however, the tag is used on a category list page (e.g. category/image/photos) then the photos category would be used
Displays all images in the database
<txp:images auto_detect="" />
No images displayed
<txp:images id="" />
<txp:images name="" />
<txp:images category="" />
This means that if you did some tag-in-tag magic such as : category=’<txp:custom_field name=“my_cats” />’ it will show no images if the custom field is empty.
Display images 2, 3, and 6
<txp:images id="2,3,6" />
Display named images
<txp:images name="lion.jpg, zebra.jpg" />
No images are displayed (mis-spelled image name)
<txp:images name="pengiun.jpg" />
Display images in the named categories
<txp:images category="mammals, birds" />
Display all images in the named categories and any uncategorized images
<txp:images category=", mammals, birds" />
Display uncategorized images
<txp:images category=" " />
Note that category=”,” also works, but a space looks better.
Display images by author (ID)
<txp:images author="attenborough, morris" />
Display all images by author
<txp:images realname="David+Attenborough" />
This incurs one extra query to look up the author’s ID from the given real name.
Display images in the named categories and authors
<txp:images category="mammals, birds" author="attenborough, morris" />
Display all jpg images in the named categories
<txp:images category="mammals, birds" extension=".jpg" />
Display all jpg images in the named categories and authors
<txp:images category="mammals, birds" extension=".jpg" author="attenborough, morris" />
Display all GIF images
<txp:images extension=".gif" />
Display all images in the named categories that have thumbnails
<txp:images category="mammals, birds" thumbnail="1" />
Display all images that have thumbnails
<txp:images thumbnail="1" />
Display all images that do not have thumbnails
<txp:images thumbnail="0" />