Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Lightbox Image Galleries on Demand View modes: 
User avatar
Member
Member
Armysniper89 - 11/2/2011 6:35:42 PM
   
Lightbox Image Galleries on Demand
Is there a way to setup a lightbox image gallery to display for images in a folder below a page when a user clicks on a button on the page?

For example I have a Page (MenuItem) called Camps which has a button on it called "Image Gallery". When a user clicks it I would like to open a light box image gallery using the Kentico web part to display images that are below the Camps page in a folder called "Gallery". How would I accomplish this?

User avatar
Member
Member
Armysniper89 - 11/4/2011 12:08:41 PM
   
RE:Lightbox Image Galleries on Demand
Sigh...

User avatar
Certified Developer 8
Certified Developer 8
Jiveabillion - 11/5/2011 12:58:39 PM
   
RE:Lightbox Image Galleries on Demand
We might need a little bit more information to give you a complete answer. Can you point us to an example where you have seen this before?

Do you basically want it so that the image gallery is not visible until you click on the button?

The easiest way to do this would be to make your "Image Gallery" button open a new window that contains your gallery. I will explain how to do it this way.

1. Create a new template for the page that will show the gallery. Don't add the lightbox webpart yet.

2. Create a page that uses your new template. You can put it in a folder like "Special Pages".

3. Add the lightbox gallery webpart to your new page. Configure the settings the way you like, but leave the path empty until step 4.

4. In the Path for the content, use a querystring macro like "{%contentpath%}/%". Save the web part.

5. On the page where you are going to put the "Image Gallery" button. Add a static html webpart that has something like this on your button:

onclick="window.open('/specialpages/yourgallerypage.aspx?contentpath={%CurrentDocument.NodeAliasPath%}');

6. Now when you click the button, it should open a new window with the gallery and pass it the path of the page that the button is on which will, in turn, set the content path to select all of the images in the folder below that page.

If you don't want it to open a new window, you'll have to figure that part out yourself for now. I hope this helps.

User avatar
Member
Member
Armysniper89 - 11/6/2011 1:18:32 PM
   
RE:Lightbox Image Galleries on Demand
I did have an example of it from the slicer who cut our design from PSD files. It worked pretty well but did not use Kentico but JQuery strictly. I cant really show you that because I only have the project files for it. I like your idea as it is simple. I will have to see what my client wants. They can always use the JQuery way if they really want but I think yours will be easier for them to use across the entire site.

Thanks!