3

I am Using SXA 1.6, my question is about the gallery component.

I need the gallery component to be able to view all the images under media library, and not be restricted to a component of type gallery and a specified set of gallery image under it only, i.e. I need the gallery component to view all items of type Image automatically. how can I achieve that?

Alternatively, is there a way for me to set the data source of the gallery component to be the media library folder? so that it would automatically read all the Image items under it?

1

You are going to have to customize the Gallery component for that. I think you are missing how the components work.

The DataSource for a Gallery is a Gallery Folder template. You can't just set it to look at media items. You can only set a single DataSource for a component. Once you have set the Gallery component DataSource, then you can add Gallery items which link through to media items.

From your requirements, you would need to create a custom component to do that. You might start by cloning the Gallery component and then implementing your own code, change the DataSource template definition and modify the view to meet your requirements. But the out of the box Gallery component will not support going direct to the images.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.