Jump to:

7935 Posts in 1536 Topics by 943 members

DataObjectManager Module

SilverStripe Forums » DataObjectManager Module » Need to add title to fancybox display

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Page: 1
Go to End
Author Topic: 3879 Views
  • zim
    Avatar
    Community Member
    135 Posts

    Need to add title to fancybox display Link to this post

    I have got the imaggallery working fine. am using fancybox to display images. I have added a TITLE field to Database along with the caption field... so now have TITLE and CAPTION saved. I have amended fancy.css and jquery.fancybox-1.0.0.js to get the box appearinmg exactly as I want.

    MY PROBLEM... is that I can not figure out how to display the TITLE above the CAPTION on the popup.

    I believe it will be a matter of amending jquery.fancybox-1.0.0.js but I am not sure where. here is the code in case anyone can help..

    //// CODE REMOVED -- see "jquery.fancybox-1.0.0.js" ////

  • UncleCheese
    Avatar
    4085 Posts

    Re: Need to add title to fancybox display Link to this post

    I'm not about to debug a third-party Javascript plugin -- you might want to try the Fancybox forums for that, but I will tell you, if you figure it out, let me know, so we can release this as a new UI option for ImageGallery. Sounds interesting.

    Sorry to remove your code. That was way too much for a single post.

  • zim
    Avatar
    Community Member
    135 Posts

    Re: Need to add title to fancybox display Link to this post

    totally understand.

    Sorry for putting all that up.

    Thought someone might have done it already.

    If I work it out I'll post it up.

  • zim
    Avatar
    Community Member
    135 Posts

    Re: Need to add title to fancybox display Link to this post

    I have spoken to fancy box developer... as advised and it is not possible to do this with fancybox as is.

    this is the message I got

    "zim
    when Janis says "you can't" is because he is fancybox developer
    and fancybox was not created that way

    of course there is always many ways to do things but it would require
    to modify or create a new script .... but so far not with fancybox as
    it is

    on the other hand, you may create your own script with captions (or
    use an existing plugin) and then display it within a fancybox "

    ...At the moment I have just put bold tag around the first bit (TITLE)
    and carraige return before second bit (CAPTION) and it now displays how i want it too. As I see it
    gets caption from img title attribute. Not sure if my hack is
    compliant or accessible though

    3879 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.