Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-12-26 23:38:22

dl33
Member
Registered: 2006-06-17
Posts: 192
Website

how to display the title and description of an image

Hi all,
I want to display images on my site with the title in a h3 tag and the description in a p tag. (I am attaching product shots…) Previously I used 3 custom fields for one image. However, I saw that when I upload an image I can also set the title and description. Is there any way to access them and display them outside of an img tag? This way I could save a couple of custom fields and display more pictures.

Thanks already, dl33

Offline

#2 2006-12-27 06:54:37

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,323
Website Mastodon

Re: how to display the title and description of an image

upm_image is a plugin which contains a lot of custom tags to display various details of images. Have a look at <txp:upm_img_caption />, for instance.

Offline

#3 2006-12-27 12:17:40

dl33
Member
Registered: 2006-06-17
Posts: 192
Website

Re: how to display the title and description of an image

Thanks, this does exactly what I want it to do… My only problem now is how to display the custom field as an attribute of the txp:upm_image tag?
Using <txp:upm_image id=”<txp:custom_field name=“FieldName” />”/> would really mess up textpattern, wouldn’t it?

Offline

#4 2006-12-27 13:17:45

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,323
Website Mastodon

Re: how to display the title and description of an image

asy_wondertag allows for tags as attributes to other tags.

Offline

#5 2006-12-27 19:12:09

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: how to display the title and description of an image

Is there a reason you want to use a custom field rather than an article image?

Offline

Board footer

Powered by FluxBB