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
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.
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 ;)
Re: How to add a javascript gallery to an article ?
Quote:
Originally Posted by xchs
Oh man, perfect, thanks so much :)
Okay a new question.
Can I have this gallery opened inside a lightbox?
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.
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?
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".
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.