Go to main content

Image date

Contents

Syntax

<txp:image_date />

The image_date tag is a single tag that Textpattern will replace with the uploaded date of the current (or given) image. Should usually be used in an @@image form@@, although it may be used on its own providing you specify an id or name.

Attributes

Tag will accept the following attributes (case-sensitive) as well as the global attributes :

id="integer"
An id assigned at upload of an image to display. The IDs can be found on the Images panel.
Default: unset.
format="format string"
Override the default date format set in the Preferences panel.
Values: any valid strftime string values, since, iso8601 (ISO 8601 reference), w3cdtf (W3CDTF reference), or rfc822 (RFC 822 reference).
Default: the ‘Archive date format’ set in preferences.
name="image name"
An image to display, given by its image name as shown on the Images panel. If both name and id are specified, the id takes precedence.
Default: unset.

Examples

Example 1: Display additional image information

<txp:images category="mammals">
    <a href="<txp:image_url />">
        <txp:thumbnail />
    </a>
    <div class="img-info">
        <txp:image_info type="caption, author" break=" by " />
        <txp:image_date format="%e %b %Y" />
    </div>
</txp:images>

Other tags used: images, image_url, image_info, thumbnail.

Genealogy

Version 4.3.0

Tag support added.

If you notice any kind of problem with this page’s construction or content (outdated information, typos, broken links, or whatever), open an issue to have it sorted. Or have a go at it yourself. :)