Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2009-05-17 17:49:05
- Gulfcoast
- Member
- Registered: 2009-04-12
- Posts: 76
Re: yab_image (display floating image+caption/subtitles)
Forgive my ignorance here. I’m trying to understand where the placement of the <span class> goes. I’m currently using it as such:
<span class=“img-caption-center”><txp:yab_image id=“34” /></span>
I’m trying to center the caption under the image. Will the span class perform that? Thank you very much.
Offline
Re: yab_image (display floating image+caption/subtitles)
Hi Gulfcoast,
Forgive my ignorance here.
it doesn’t matter, you’re welcome. :)
I’m currently using it as such:
<span class=“img-caption-center”><txp:yab_image id=“34” /></span>
I’m trying to center the caption under the image. Will the span class perform that?
You don’t need to place the span manually. The <span class="img-caption-{left|center|right}">
will automagically appear if you use the plugin with an align attribute as the following:
<txp:yab_image id="34" align="center" />
In your example without the align attribute the span will not generated. But the this span is not needed for centering the caption.
In your example (<txp:yab_image id="34" />
) you only need an additional CSS statement to center the caption:
small.caption {
text-align: center
}
Last edited by trenc (2009-05-18 08:36:53)
Digital nomad, sailing the world on a sailboat: 32fthome.com
Offline
#15 2009-05-18 12:01:31
- Gulfcoast
- Member
- Registered: 2009-04-12
- Posts: 76
Re: yab_image (display floating image+caption/subtitles)
Thank you very much Trenc.
Offline
#16 2009-10-20 11:38:55
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
Re: yab_image (display floating image+caption/subtitles)
Niconemo wrote:
;-) But, for those who use upm_image (and upm_img_popper) you can do that this way for a long time in the Custom form (it’s an example)…
<div class="img-with-caption" style="width <txp:upm_img_full_width />px" > <img src="<txp:upm_img_full_url />" alt="<txp:upm_img_alt />" /> <br /><span class="img-caption"> <txp:upm_img_caption /></span> </div>
could anybody make me this chapter and verse. i’m using upm_image and upm_image_popper but i can’t do it. where to put this code, how to use custom form for that?
Offline
Re: yab_image (display floating image+caption/subtitles)
Gallex wrote:
could anybody make me this chapter and verse. i’m using upm_image and upm_image_popper but i can’t do it. where to put this code, how to use custom form for that?
Answer: the documentation of upm_image. It clearly states that both, upm_image
and upm_article_image
have form
attribute and both can also be used as containers. The code goes into your article context page.
Offline
Re: yab_image (display floating image+caption/subtitles)
New version 0.4:
- can now handle hyperlinks in captions (Read plugin help, please!)
- added: alt_alt attribute for alternative img alt attribute
- added: alt_title attribute for alternative img title attribute
- added: alt_as_title attribute for alternative img title attribute
Last edited by trenc (2010-09-24 13:22:11)
Digital nomad, sailing the world on a sailboat: 32fthome.com
Offline
Re: yab_image (display floating image+caption/subtitles)
yab_image_v0.5.txt is now TXP 4.6-ready.
Digital nomad, sailing the world on a sailboat: 32fthome.com
Offline