Hi everyone,
I am trying to reverse-engineer some modules in the Design Manager that an agency did for us and make changes to them, so I am not too familiar with HubL yet and am reading through the developer documentation as I go.
This one is a carousel module, based on the bootstrap carousel. To add more slides, the carousel-item-class is looped. I added some optional CSS gradient overlay controls to the looped image slide, which works fine.
{% for item in module.slide %}
<div class="carousel-item-{{loop.index}} carousel-item{% if loop.first %} img-fluid active{% endif %}" data-interval="{{ item.slide_duration *1000 }}" style="background-image:
{% if item.overlay_gradient %}
linear-gradient(
{% if item.gradient_direction != 'custom' %}
{{ item.gradient_direction }}
{% else %}
{{ item.custom_direction }}deg
{% endif %}, rgba({{ item.gradient_first_color.color|convert_rgb }}, {{ item.gradient_first_color.opacity / 100 }}), rgba({{ item.gradient_second_color.color|convert_rgb }}, {{ item.gradient_second_color.opacity / 100}})),
{% endif %}
url({{ item.image_slider.src }});background-size: cover;background-position: center;">
{% if item.link %}<a class="carousel-item-link" href="{{item.link}}"></a> {% endif %}
The looped carousel-item is put into a module subgroup called “slide”. Within this slide subgroup, I would like to create another subgroup “gradient_settings” (hence a nested group) for just the gradient controls. But then, I don’t know how to correctly address the items in the nested group with HubL. I tried various combinations, e.g.
- item.gradient_settings.gradient_first_color.color
- item.slide.gradient_settings.gradient_first_color.color
- module.item.slide.gradient_settings.gradient_first_color.color
- module.slide.gradient_settings.gradient_first_color.color
etc., but none of these work.
How do I need to address items in HubL with this hierarchy?
Module - looped “slide group” - Nested “gradient_settings group” within the looped “slide group” - single item?
Thanks ![]()


