Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Image caption


Go to End


5 Posts   2712 Views

Avatar
François

25 Posts

18 October 2008 at 8:12pm

I need to add a caption for each image inserted in a page. And of course this caption must be i18n (translatable).

Does anybody here already had this problem? Is there any widget or code been already developped to solve this? If not, any pointer where to start to add such a field?

Another question: I'm wondering what exactly is the image "description" field for? Is it only a informationnal field for the webmaster?

Thanks for any information.

Avatar
François

25 Posts

29 October 2008 at 11:19pm

Nobody with the same problem?

Avatar
François

25 Posts

4 December 2008 at 3:50am

How can I get the content of the "description" field of the image and display it along the image. By default SS put the content of this field in the ALT and TITLE properties of the IMG tag. How can I access this field ?

Avatar
jam13

121 Posts

4 December 2008 at 4:23am

How about:

<% control MyImage %><img src="$Link">$Title<% end_control %>

Avatar
François

25 Posts

4 December 2008 at 4:43am

Thanks for the input. Yes it would do it. But my problem is different.

It is related to the images inserted via tinymce editor. I think I will need to edit tinymce behavior or try to convince my customer to write the image description differently.