Results 1 to 8 of 8

Thread: How to add a javascript gallery to an article ?

  1. #1
    User
    Join Date
    06-20-10.
    Posts
    64

    Default How to add a javascript gallery to an article ?

    Hi all, sorry if this is a silly question:

    I would like to add this javascript gallery in one of my articles:
    http://finnrudolph.de/ImageFlow/

    What would be the best way to go about this in Contao?

    I thought about using an iframe, is this a good way to do this?

    Thank you

  2. #2
    Experienced user
    Join Date
    01-12-10.
    Posts
    814

    Default Re: How to add a javascript gallery to an article ?

    Nope, it might work but a better solution is to use the default Contao gallery. You must have it use a custom template that you write. The rest is done using javascript. So if the html you create contains the correct elements and a way to attach the javascript (classnames/id), you are half way done. Then just insert the javascript code.

    edit: or install the extension or course.

  3. #3
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,287

    Default Re: How to add a javascript gallery to an article ?

    Hi partisanentity,

    Quote Originally Posted by partisanentity
    What would be the best way to go about this in Contao?
    Just install the corresponding extension: http://www.contao.org/extension-list/vi ... ow.en.html
    Contao Community Moderator
    → Support options

  4. #4
    User
    Join Date
    06-20-10.
    Posts
    64

    Default Re: How to add a javascript gallery to an article ?

    Quote Originally Posted by xchs
    Hi partisanentity,

    Quote Originally Posted by partisanentity
    What would be the best way to go about this in Contao?
    Just install the corresponding extension: http://www.contao.org/extension-list/vi ... ow.en.html
    Oh man, perfect, thanks so much

    Okay a new question.

    Can I have this gallery opened inside a lightbox?

  5. #5
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,287

    Default Re: How to add a javascript gallery to an article ?

    Quote Originally Posted by partisanentity
    Can I have this gallery opened inside a lightbox?
    I do not think so.

    However, you could use this extension to open a standard Contao gallery in a lightbox overlay. Just select the corresponding content element provided by the mentioned extension.
    Contao Community Moderator
    → Support options

  6. #6
    User
    Join Date
    06-20-10.
    Posts
    64

    Default Re: How to add a javascript gallery to an article ?

    Ok, final question:

    As far as I can tell, lightbox is installed in Contao by default (at least its installed in my installation).

    How do I open an image in a lightbox? Do I need a special tag? Or where do I click/activate the setting to have a specific image opened in lightbox?

  7. #7
    Community-Moderator xchs's Avatar
    Join Date
    06-19-09.
    Posts
    1,287

    Default Re: How to add a javascript gallery to an article ?

    Quote Originally Posted by partisanentity
    As far as I can tell, lightbox is installed in Contao by default (at least its installed in my installation).
    "Lightbox" is a general term for a JavaScript overlay image presentation technique. With Contao you get two Lightbox variants, i.e. "Slimbox" and the more sophisticated "Mediabox" (Advanced).

    Quote Originally Posted by partisanentity
    How do I open an image in a lightbox? Do I need a special tag? Or where do I click/activate the setting to have a specific image opened in lightbox?
    You need to specify the corresponding rel-attribute in the image tag. That said, you have to provide an attribute rel="lightbox" or rel="lightbox[foo]" or rel="lightbox[bar 640 480]" and so on.

    When you add a content element of type "Text" and you want to add also a picture with a lightbox effect, just select the option "Full-size view/new window". On the other side, if you are more familar with the RTE TinyMCE you can add the lightbox image right there, too. Just select the button "Insert/edit thumbnail image".
    Contao Community Moderator
    → Support options

  8. #8
    Experienced user
    Join Date
    06-20-09.
    Posts
    1,311

    Default Re: How to add a javascript gallery to an article ?

    and make sure the appropriate MooTools templates (moo_mediabox) is checked in your page layout, so the javascript need is included.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •