Textpattern logo

Help?

image url

From Textbook

<txp:image_url />

The image_url> tag is a single or a container tag that Textpattern will replace with the URL of the current image in an image_list, or the specific image if given an id or name.

If used as a container tag, it must be specified as an opening and closing pair of tags, like this:

<txp:image_url>
...link contents...
</txp:image_url>

Contents

Attributes

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

id="integer"
An id assigned at upload of an image to display. The IDs can be found on the Images tab.
Default: unset.
name="image name"
An image to display, given by its image name as shown on the Images tab. If both name and id are specified, the id takes precedence.
Default: unset.
thumbnail="boolean"
If set to 1, will display the link to the image's thumbnail instead of the full size image.
Default: 0.
link="link type"
Whether to hyperlink the URL or not.
Values:
1: hyperlink the URL (if used as a single tag) or the container content.
0: don't hyperlink the URL / container.
auto: only apply the hyperlink if the tag is used as a container.
Default: auto.

Examples

Example 1: Directly link gallery thumbs to main image

Used as a single tag:

<txp:image_list category="mammals">
   <a href="<txp:image_url />"><txp:thumbnail /></a>
</txp:image_list>

or as a container:

<txp:image_list category="mammals">
   <txp:image_url><txp:thumbnail /></txp:image_url>
</txp:image_list>

Other tags used: image_list, thumbnail

Genealogy

Version 4.3.0

  • tag introduced

Translations [?]...

About Textbook