An interactive gallery ?
Permalink 1 user found helpful
Hello,
I am a programmer, but newbie in C5, and I am looking to have an interactive gallery.
I need to present on a front-end page a list of albums in a combo (let's say an album will be a C5 fileset), and depending on the user choice, display the images that are in the selected fileset. Since I will have a large amount of images, I will use AJAX to reload only the gallery block.
It may be obvious, but I do not know how to do this.
Any help/pointer is more than welcome.
Thanks !
tobbie
I am a programmer, but newbie in C5, and I am looking to have an interactive gallery.
I need to present on a front-end page a list of albums in a combo (let's say an album will be a C5 fileset), and depending on the user choice, display the images that are in the selected fileset. Since I will have a large amount of images, I will use AJAX to reload only the gallery block.
It may be obvious, but I do not know how to do this.
Any help/pointer is more than welcome.
Thanks !
tobbie
Hello,
I am working on something like this but it's nto finished yet.
Meanwhile here's what you can do:
1- select a gallery that uses filesets
2- buy the add-on Blocks by Ajax (http://www.concrete5.org/marketplace/addons/blocks-by-ajax/)
Using this add-on you can load other blocks using Ajax on whatever event you specify.
All you need to do then is create several galleries, one per set than create a block with one image per set and have Blocks by Ajax load the appropriate gallery upon click on the image.
A bit of a hack but should work
I am working on something like this but it's nto finished yet.
Meanwhile here's what you can do:
1- select a gallery that uses filesets
2- buy the add-on Blocks by Ajax (http://www.concrete5.org/marketplace/addons/blocks-by-ajax/)
Using this add-on you can load other blocks using Ajax on whatever event you specify.
All you need to do then is create several galleries, one per set than create a block with one image per set and have Blocks by Ajax load the appropriate gallery upon click on the image.
A bit of a hack but should work
Many thanks for your answer. I already had a look to your link, but I need to go deeply in it, for sure. I already know how to make an AJAX call in C5, and I will mostly to buy Block for AJAX addon anyway.
The pb is that I cannot create one gallery neither one page per fileset. My authenticated users will be able to upload new image filesets using a simplified front-end interface (to risky to give them access to any other function). And therefore they will not be able to edit the page.
Any other idea ? Is it simply possible to modify on the fly the value of one block attribute ? I guess it must be, not sure anyway.
Thanks !
tobbie
The pb is that I cannot create one gallery neither one page per fileset. My authenticated users will be able to upload new image filesets using a simplified front-end interface (to risky to give them access to any other function). And therefore they will not be able to edit the page.
Any other idea ? Is it simply possible to modify on the fly the value of one block attribute ? I guess it must be, not sure anyway.
Thanks !
tobbie
You could use a combination of various addons in my Magic Data suite to get you closer to what you want, especially if you do some minor tweaks to block templates.
Magic Data On Block Load is designed specifically to modify block parameters on-the-fly. However, beware of the block cache as it can get in the way of such modification. With this you can have one page with a gallery that loads a fileset determined by a Magic Data expression. Or you could easily modify a gallery block to process Magic Data directly.
You could alternatively use Uber List to list a fileset (or any list of files) determined my Magic Data and then use the integration between Magic Data and oembed for a lightbox popup. Or you could add a little bit of javascript to the block template to pop up the list items in a lightbox. (I will probably add a built in lightbox to the Magic Data Symbols package at some point).
Currently in the PRB is 'Black Magic Data', which extends Magic Data to do things like setting attributes.
The next version of Blocks by AJAX (ie. not yet available, but coming soon) will have options for form integration, so form parameters from the page can be scraped and inserted in the Blocks By AJAX load. It will also provide Magic Data symbols, so when a block containing Magic Data is AJAX loaded, any Magic Data in the block can read those form parameters.
Magic Data On Block Load is designed specifically to modify block parameters on-the-fly. However, beware of the block cache as it can get in the way of such modification. With this you can have one page with a gallery that loads a fileset determined by a Magic Data expression. Or you could easily modify a gallery block to process Magic Data directly.
You could alternatively use Uber List to list a fileset (or any list of files) determined my Magic Data and then use the integration between Magic Data and oembed for a lightbox popup. Or you could add a little bit of javascript to the block template to pop up the list items in a lightbox. (I will probably add a built in lightbox to the Magic Data Symbols package at some point).
Currently in the PRB is 'Black Magic Data', which extends Magic Data to do things like setting attributes.
The next version of Blocks by AJAX (ie. not yet available, but coming soon) will have options for form integration, so form parameters from the page can be scraped and inserted in the Blocks By AJAX load. It will also provide Magic Data symbols, so when a block containing Magic Data is AJAX loaded, any Magic Data in the block can read those form parameters.
Thanks to mnakaly and johnthefish for their valuable help and advises.
Until now, I did not understand what Magic Data was doing, and I think that this solution suits my needs quite well.
I close this thread for now and I will experiment the different solutions.
tobbie
Until now, I did not understand what Magic Data was doing, and I think that this solution suits my needs quite well.
I close this thread for now and I will experiment the different solutions.
tobbie
v2.0 of Blocks By AJAX is now availablehttp://www.concrete5.org/marketplace/addons/blocks-by-ajax/... . It includes a remote control block for easy customisation of AJAX settings, Form and Magic Data integration.
Another way to say : I would like to know how I can dynamically change an attribute of a block prior to reload it using AJAX. This way, I will have one combo showing all the tagged filesets, and use the selection to pass the fileset id as a parameter to the gallery block.
I know that I could have one page per fileset, and then use a Page List template, but I cannot ask my users to create a new page each time they want to add an album.
I saw several threads about this, so it appears to be a common problem.
Any addon, even if I have to pay for ?
Please help !
tobbie