Hopefully, the HubSpot developers here will be nice. I’m trying to retrieve rows data from a hubdb table like this:
{% set gallery = hubdb_table_rows(<tableId>, "<columnName>__contains=<a multi-select columnProperty>") %}
{% if gallery == [] %}
<p class="error__notice"> Sorry, you do not have objects in your database. Try changing the filter </p>
{% else %}
<div class="digi__gallery-items">
{% for row in gallery %}
{% module_block gallery "Gallery" display_mode="standard" sizing="static", transition="slide", caption_position="superimpose", auto_advance=True, overrideable=True, description_text="", show_pagination=True, label="Gallery", loop_slides=True, num_seconds=5 %}
{% module_attribute "slides" is_json=True %}
{
"caption": "<h3>{{ row.authors }}</h3>",
"show_caption": true,
"link_url": "{{ row.main_url }}",
"alt_text": "Screenshot of eP",
"img_src": "{{ row.image.url }}",
"open_in_new_tab": true
}
{% end_module_attribute %}
{% end_module_block %}
{% endfor %}
</div>
{%.endif %}
I’m using the hubl gallery tag (as per the block syntax method with a slide parameter attribute) to loop over an image and link columns as shown in the code block with expectation {{.row.image.url }} returns an image link, while {{ row.image_url }} provide the hyperlink for each slide.
Unfortunately, the aforementioned table data don’t work but, the caption property (Json) successfully pulls up data from the database as shown in the screenshot below. Screenshot of the hubl output What am I doing wrong and could you suggest an easier work-through? THANKS!