Is there a way to customize the HubL Gallery module? Basically removed all of the styling, wrappers, etc. so it just spits out the images? Then take those images and wrap them in some HubL code like so:
The "export_to_template_context" part releases all of the data for the module into the template for you to play with. The data that is available for the gallery module is:
You set this data up by adding images to the gallery on the editing page, so you would go to the page editor and add an image, the alt text for the image, a link if needed, and a caption.
Then you can fully customize the gallerys markup by looping through it:
I create the gallery widget, exporting the data to the template. I then make a for loop that says for each slide in the image gallery I want to output this image tag.
The code inside the for loop can be as simple or complex as you can make it. you can use divs or other wrappers, paragraphs, ids, classes, you name it. It will print whatever you put here per slide, so if you add 100 images to the gallery it will out put the code 100 times on the page.
You can use any of your own js to do what ever you want with the images because you have full control of how the data is output.
You can change "item" to pretty much anything like "slide", "image", "block". just make sure you change that identifier in the data tokens and your good to go.
crm_gallery is my system name for the gallery widget:
Jan 31, 201711:19 AM - edited Jan 31, 201711:23 AM
Key Advisor | Partner
Custom Gallery
SOLVE
I think the easiest way is to use a flex column with image modules. For example, a flex column with a custom class "my-custom-slider" can be used with Flickity by initializing it like so:
The only issue with this is you have to deal with HubSpot's markup. Slick.js requires all slides to be the direct child of the parent category, so you would need to initialize it like this:
That's an interesting solution. I think it would accomplish what I'm looking to do. And maybe adding the no_wrapper = true to the modules would help alleviate some of the parent/child issues.