Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-10-26 22:00:01

pbrienesse
Member
Registered: 2008-03-14
Posts: 10

How do I display the caption associated with an image.

I consider myself reasonably adept at textpattern and up to this point have never had a need to display the caption that is added through the images tab. I’ll be darned if I can figure out how to do it. I am trying to avoid using a plugin so my client can still use the build tag function.

Is there anyway to control the display of a caption using the txp:image tag or am I forced to use a plugin?

Offline

#2 2008-10-26 22:29:55

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: How do I display the caption associated with an image.

Textpattern’s core doesn’t show captions. You will need plugins (or raw php), for this case upm_image or alternative. Plugins are good thing and most of all, Textpattern is plugin based CMS, so it isn’t forced, it’s matter of fact a gift ;)

Note to other’s strugling against plugins (not rant against pbrienesse): It’s odd how ppl try to avoid using plugins, and then most of them complain about how TXP doesn’t handle thing x. If that is the case, then you got wrong non-overbloated CMS. Those ppl use plugin based CMS because of their choise. Get real, if you don’t like plugins, don’t use CMS that biggest advance are plugins :)

Last edited by Gocom (2008-10-26 22:35:24)

Offline

#3 2008-10-27 21:57:56

pbrienesse
Member
Registered: 2008-03-14
Posts: 10

Re: How do I display the caption associated with an image.

Thanks for not ranting :)

I wasn’t putting down plugins. In fact I use lots of them. It is just when you are making a site for someone else and they can press a button that says build tag it is way easier than needing to learn the plugin’s syntax. I agree though plugins are the s#i7.

Offline

#4 2008-10-27 23:48:25

masa
Member
From: Asturias, Spain
Registered: 2005-11-25
Posts: 1,091

Re: How do I display the caption associated with an image.

pbrienesse wrote:

It is just when you are making a site for someone else and they can press a button that says build tag it is way easier than needing to learn the plugin’s syntax.

I agree.
I suggest you get upm_image and its companion plugin upm_img_popper

The popper plugin adds a handy Insert Image to the Write tab. Click it and you’ll be presented with an image listing and a wealth of options how to insert any image. The interesting one is the field labelled Custom form. There you can specify a form to render your image and caption, mine is called image_caption looks like this:

<p><img src="<txp:upm_img_full_url />" width="<txp:upm_img_full_width />" height="<txp:upm_img_full_height />" alt="<txp:upm_img_alt />" /></p>
<p class="caption"><txp:upm_img_caption /></p>

Now all the users needs to do is to click Custom form in the Insert (upm_image) column of the window and the correct tag will be placed in the article.

Hope that helps!

Last edited by masa (2008-10-27 23:49:20)

Offline

Board footer

Powered by FluxBB