Page 1 of 1

[Solved] Gallery open subgallerys without changing page

Posted: Fri Jun 28, 2013 10:39 am
by sniek
Hi Guys,

I'm currently working on a 1 page design. With the module CGSimple Smarty I get my content from different pages.
On one of the pages I have my {Gallery} tag to display all the subgallerys.

When I open one of the subgallerys, my page "resets" because the url changes. So I'm looking for some way to open the subgallerys inline.

Like with an iframe or some AJAX requests. Does anyone knows if this is possible? Or could help me out on how to make this?

If there is anything not clear, feel free to ask.
If you need a live preview, pm me your IP so I could add you to the whitelist.

Thanks in advance!

Re: Gallery open subgallerys without changing page

Posted: Fri Jun 28, 2013 5:40 pm
by Rolf
Something like this http://www.cmscanbesimple.org/blog/tabb ... ing-jquery and call each subgallery in a seperate tab?

Re: Gallery open subgallerys without changing page

Posted: Sat Jun 29, 2013 11:12 am
by sniek
Hi Rolf,

This could be a way to do it, Ill just use the gallery thumbs to call a div with the subgallery content. I might need some help with the smarty and gallery template, but let me see how far I get on my own :) .

Re: Gallery open subgallerys without changing page

Posted: Sat Jun 29, 2013 12:02 pm
by velden
Have a look at this page: http://goo.gl/j623h

It contains 7 (sub)galleries from which only the first image is shown.

It saves you space and won't reload page, but it does not save you bandwidth as all thumbs are loaded immediately. However, if you do NOT need a thumb bar in the fancybox overlay, then you could probably choose not to load all the thumbs except the first per gallery.

If you need an example code:
http://forum.cmsmadesimple.org/viewtopi ... 33#p290133

I think Ajax is possible too. Read calguy's post about Ajax and News and try to translate to Gallery. http://calguy1000.com/Blogs/9/60/jquery ... -news.html

Re: Gallery open subgallerys without changing page

Posted: Sat Jun 29, 2013 1:59 pm
by sniek
Well, solved the issue with Rolf's solution.
Still needs some finetuning, but it does the job!