thumbnail
From Textpattern CMS User Documentation
<txp:thumbnail />
The thumbnail tag is a single tag that Textpattern will replace with the <img src="..." /> HTML tag matching the thumbnail image of the numeric id assigned by Textpattern when the parent image was uploaded via the Textpattern Images panel.
Contents |
Attributes
Tag will accept the following attributes (case-sensitive):
- class="class name"
- CSS
classattribute to apply to the image (or to the wraptag, if set). - Default is unset.
- escape="html"
- Escape HTML entities such as
<,>and&for the image'saltandtitleattributes. - Values:
htmlor unset. - Default:
html. - height="integer"
- Specify an image height which overrides the value stored in the database. Use
height="0"to turn off the output of a height attribute in the<img>tag (thus the browser will scale the height if a width is used) - html_id="id"
- The HTML
idattribute assigned to the image (or to the wraptag, if set). - Default: unset.
- id="integer"
- Specifies the
idassigned at upload of the image to display. Can be found on the Images (panel). If bothnameandidare specified,nameis used whileidis ignored. - link="boolean"
- If set, the thumbnail will be rendered as a (non-Javascript) URL link to the full-size image.
- Default:
0. - link_rel="relation"
- Value for the HTML
relattribute. - Default: unset.
- name="image name"
- Specifies which image thumbnail to display by its image name as shown on the Images (panel).
- poplink="boolean"
- If set, the image will be rendered in a popup window.
- Default is
0. - style="style rule"
- Inline CSS style rule.
- Default: unset.
- width="integer"
- Specify an image width which overrides the value stored in the database. Use
width="0"to turn off the output of a width attribute in the<img>tag (thus the browser will scale the width if a height is used) - wraptag="tag text"
- HTML tag to be used to wrap the
imgtag, specified without brackets. - Default: unset.
Examples
Example 1: Display the given thumbnail
<txp:thumbnail id="23" />
- What this does...
- Displays the image thumbnail for the image uploaded as ID #23.
Genealogy
Version 4.2.0
- attribute
aligndeprecated
Version 4.0.7
- default value for attribute
escapechanged from unset tohtml
Version 4.0.6
-
linkandlink_reladded
Version 4.0.4
-
html_id,escapeandwraptagadded




