[Solved] Gallery open subgallerys without changing page

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
sniek
Forum Members
Forum Members
Posts: 17
Joined: Tue Nov 30, 2010 9:56 am

[Solved] Gallery open subgallerys without changing page

Post 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!
Last edited by sniek on Sat Jun 29, 2013 2:00 pm, edited 1 time in total.
User avatar
Rolf
Power Poster
Power Poster
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Contact:

Re: Gallery open subgallerys without changing page

Post by Rolf »

Something like this http://www.cmscanbesimple.org/blog/tabb ... ing-jquery and call each subgallery in a seperate tab?
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
sniek
Forum Members
Forum Members
Posts: 17
Joined: Tue Nov 30, 2010 9:56 am

Re: Gallery open subgallerys without changing page

Post 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 :) .
User avatar
velden
Dev Team Member
Dev Team Member
Posts: 3497
Joined: Mon Nov 28, 2011 9:29 am

Re: Gallery open subgallerys without changing page

Post 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
sniek
Forum Members
Forum Members
Posts: 17
Joined: Tue Nov 30, 2010 9:56 am

Re: Gallery open subgallerys without changing page

Post by sniek »

Well, solved the issue with Rolf's solution.
Still needs some finetuning, but it does the job!
Post Reply

Return to “Modules/Add-Ons”