Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
editing article image tag
i am trying to implement this to an article image:
http://www.mudcorporation.com/code/js/MudToolTip-1.5/
and i need to be able to add a “title” tag to the image. any idea how i can do this?
i need to turn this: <txp:article_image class=“tooltip” thumbnail=“0” /> into this <img src=“photo.jpg” class=“tooltip” title=“description”/>
thanks!
Last edited by alittle116 (2006-11-14 22:49:34)
Offline
Re: editing article image tag
<txp:article_image class="tooltip" />
Then add the tooltip info into the image’s caption box in Content>images. I think caption becomes your title, or maybe alt does. Can’t remember.
Offline
#3 2006-11-14 23:47:56
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: editing article image tag
Caption does.
Offline
Re: editing article image tag
ok but im not actually uploading the images through txp. i am using the “article image” field on the “write” subtab with a url to the image which is on flickr. so when i do that, the image does not show up under the “images” subtab.
so is there another way to do this? or do i have to upload the images through the “images” subtab?
Offline
Re: editing article image tag
This is very late, but what if i wanted alt text instead of caption to be used in an image title tag?
Is there really only upm_image left for this?
A hole turned upside down is a dome, when there’s also gravity.
Offline
#6 2011-06-08 15:31:16
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,315
Re: editing article image tag
If I didn’t misunderstand: Starting from TXP 4.3 you can use <txp:image_info type="alt" />
.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: editing article image tag
With upm_image, just for the record, it works like this:
in article form
<txp:upm_article_image show_height="yes" show_width="yes" form="img_title_alt" />
in form img_title_alt
<img src="<txp:upm_img_full_url />" title="<txp:upm_img_alt />" />
However, Uli, if you can think of a way to do this with txp built-in images tags, please post. Since SEO rating works better, when images carry info about their content in their filenames and/or title tags it is crucial, that at least the title tag works. And sparing a pluging wouldn’t hurt either.
(I personally tend to use the caption field for the source of an image, the photographer, or the web site i got the image from. So i wouldnöt draw the title tag content from a caption field, as it usually less descriptive, than the alt text.)
A hole turned upside down is a dome, when there’s also gravity.
Offline
#8 2011-06-08 18:25:11
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: editing article image tag
Something like this?
<txp:images auto_detect="article" form="img_title_alt" />
Form ‘img_title_alt’:
<img src="<txp:image_url />" width="<txp:image_info type="w" />" height="<txp:image_info type="h" />" title="<txp:image_info type="alt" />" />
Offline
Pages: 1