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

Gallery File Caption... adding HTML code


Go to End


2 Posts   1954 Views

Avatar
cindycin

Community Member, 20 Posts

10 July 2008 at 3:15am

Hello,

I set up the Gallery module and it is great. I just have a question regarding the image/file caption that is displayed in the popup. I would like to create paragraph breaks, bold and italic, and possibly links to the captions I add. When I add in HTML code and view the page an error message appears saying that '<' is not a valid character. Is there a way for me to allow the captions to accept such characters and HTML coding?

Thanks.

Avatar
bennybtl

Community Member, 12 Posts

10 July 2008 at 6:26am

The caption exists within the <a> tag such as

<a id="ViewLink-68" class="lightwindow" rel="name[Media]" href="http://www.sample.com/ss/assets/image.jpg" title="Title" caption="This is the Caption">

Putting any html in between the " " would 'break' the markup. There may be an alternate way to pass captions to Lightbox, but I don't know of it.