Textpattern CMS Template Tags

<txp:image_author /> single tag, 6 attributes

image_author

The image_author tag is a single tag that Textpattern will replace with the author’s name associated with the current image in an images list.

attributes

section="unset" 
  • Direct any linked author name to the nominated section instead of to the default (front) page.
this_section="0" (boolean)
  • If set to 1, the linked author name will direct users to an author list in the current section.
link="0" (boolean)
  • Whether to hyperlink the author (1) or not (0).
title="1" (boolean)
  • Whether to display the author’s real name (1) or login name (0).
wraptag="unset" 
  • (X)HTML tag (without brackets) to wrap around the author name.
class="unset" 
  • CSS class attribute to be applied to the wraptag.

genealogy

Version 4.3.0

  • tag introduced
<txp:image_author /> 2 examples

Add image author to gallery

<txp:images category="mammals">
   <a href="<txp:image_url />"><txp:thumbnail /></a>
   <div class="by">by <txp:image_author /></div>
</txp:images>

Other tags used: images, thumbnail

Link to author list

<txp:images category="fish">
   <a href="<txp:image_url />"><txp:thumbnail /></a>
   <div class="by">by <txp:image_author link="1" /></div>
</txp:images>

What it does…
Displays thumbnails and author info for each image in the fish category. The authors’ names are hyperlinked to site.com/author/image/User+Name.

Other tags used: images, thumbnail