Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Image caption

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

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

Page: 1
Go to End
Author Topic: 1868 Views
  • François
    Avatar
    25 Posts

    Image caption Link to this post

    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.

  • François
    Avatar
    25 Posts

    Re: Image caption Link to this post

    Nobody with the same problem?

  • François
    Avatar
    25 Posts

    Re: Image caption Link to this post

    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 ?

  • jam13
    Avatar
    121 Posts

    Re: Image caption Link to this post

    How about:

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

  • François
    Avatar
    25 Posts

    Re: Image caption Link to this post

    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.

    1868 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.