Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-08-07 11:27:44

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

image list with captions without plug ins

Hi is there a way to include captions below an image in a list of images without using a plug in yet?

I am using the images tag inside an article, i don’t need to use image index.

At the moment in the form for the images tag i just have an image tag.

I would like to wrap each image with an li or a div or something for a bottom or top border to visually separate them.

With textpatterns new image capabilities could I get a caption to show between the image and the wraptag without using plugins and negative css margins?

I’ve read the docs and i don’t see a way to do this?
-best
Kevin

sorry i figured this out….

Last edited by kvnmcwebn (2011-08-07 12:01:15)


its a bad hen that wont scratch itself.
photogallery

Offline

#2 2011-08-07 12:58:21

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,536
Website GitHub Twitter

Re: image list with captions without plug ins

Hi kevin

how aboit this:

<txp:images id="3,4,8"><div><txp:image /><txp:image_info type="caption" wraptag="p" class="img_cap" /></div></txp:images>

NB: you can change id=”…” with category if you use a category image.

Cheers

Last edited by Dragondz (2011-08-07 12:58:52)

Offline

#3 2011-08-07 14:17:25

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: image list with captions without plug ins

Hi Rabah, Thanks I like your solution.
I figured out something similar on my own but the code is generating a <br/> tag somewhere and I can’t find where. I need the images tag in an article.
This is what i have:

in the article:

<txp:images category="bogside" form="essays" wraptag="ul"   />

in the form “essays”

<txp:image  class="essays" wraptag="li" class="imagelist" /><txp:image_info break="li" breakclass="imageinfo"  />

this is the output:

<br /><li class="imagelist"><img src="http://donegalimage.com/images/129.jpg" alt="Bogside Mu ral, Co. Derry" title="Bogside Mural, Co. Derry " width="705" height="505" /></li><li class="imageinfo">
Bogside Mural, Co. Derry 
</li><br /><li class="imagelist"><img src="http://donegalimage.com/images/184.jpg" alt="Bogside Mural, Co. Derry" title="Bogside Mural, Co. Derry " width="397" height="599" /></li><li class="imageinfo">
Bogside Mural, Co. Derry 
</li>

not sure where the extra break is coming from

Last edited by kvnmcwebn (2011-08-07 14:18:12)


its a bad hen that wont scratch itself.
photogallery

Offline

#4 2011-08-07 15:18:21

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

Re: image list with captions without plug ins

kvnmcwebn wrote:

not sure where the extra break is coming from

The images tag’s default break is br. Goes away if you add break="" to the tag.

Offline

#5 2011-08-07 19:02:13

kvnmcwebn
Member
From: Ireland
Registered: 2007-01-27
Posts: 724
Website

Re: image list with captions without plug ins

doh thanks.


its a bad hen that wont scratch itself.
photogallery

Offline

#6 2011-08-07 19:24:59

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,536
Website GitHub Twitter

Re: image list with captions without plug ins

I always think that those kind of defaults value allways give troubles!!

Offline

Board footer

Powered by FluxBB