<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic HubdB Column Data Can't Be Retrieved in a Gallery Slide Block Syntax in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/HubdB-Column-Data-Can-t-Be-Retrieved-in-a-Gallery-Slide-Block/m-p/648099#M29071</link>
    <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;Kindly help out with this.&lt;BR /&gt;I’m trying to retrieve rows data from a hubdb table like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{% set gallery = hubdb_table_rows(&amp;lt;tableId&amp;gt;, "&amp;lt;columnName&amp;gt;__contains=&amp;lt;a multi-select columnProperty&amp;gt;") %}
{% if gallery == [] %}
&amp;lt;p class="error__notice"&amp;gt; Sorry, you do not have objects in your database. Try changing the filter &amp;lt;/p&amp;gt;
{% else %}
&amp;lt;div class="digi__gallery-items"&amp;gt;
{% 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": "&amp;lt;h3&amp;gt;{{ row.authors }}&amp;lt;/h3&amp;gt;",
"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 %}
&amp;lt;/div&amp;gt;
{%.endif %}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;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.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screen Shot 2022-06-11 at 07.47.19.png" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/68391i571075751C0A95D0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2022-06-11 at 07.47.19.png" alt="Screen Shot 2022-06-11 at 07.47.19.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong and could you suggest an easier work-through? THANKS!&lt;/P&gt;</description>
    <pubDate>Mon, 13 Jun 2022 10:48:36 GMT</pubDate>
    <dc:creator>CephasO</dc:creator>
    <dc:date>2022-06-13T10:48:36Z</dc:date>
    <item>
      <title>HubdB Column Data Can't Be Retrieved in a Gallery Slide Block Syntax</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubdB-Column-Data-Can-t-Be-Retrieved-in-a-Gallery-Slide-Block/m-p/648099#M29071</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;Kindly help out with this.&lt;BR /&gt;I’m trying to retrieve rows data from a hubdb table like this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{% set gallery = hubdb_table_rows(&amp;lt;tableId&amp;gt;, "&amp;lt;columnName&amp;gt;__contains=&amp;lt;a multi-select columnProperty&amp;gt;") %}
{% if gallery == [] %}
&amp;lt;p class="error__notice"&amp;gt; Sorry, you do not have objects in your database. Try changing the filter &amp;lt;/p&amp;gt;
{% else %}
&amp;lt;div class="digi__gallery-items"&amp;gt;
{% 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": "&amp;lt;h3&amp;gt;{{ row.authors }}&amp;lt;/h3&amp;gt;",
"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 %}
&amp;lt;/div&amp;gt;
{%.endif %}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;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.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;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.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screen Shot 2022-06-11 at 07.47.19.png" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/68391i571075751C0A95D0/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2022-06-11 at 07.47.19.png" alt="Screen Shot 2022-06-11 at 07.47.19.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong and could you suggest an easier work-through? THANKS!&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 10:48:36 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubdB-Column-Data-Can-t-Be-Retrieved-in-a-Gallery-Slide-Block/m-p/648099#M29071</guid>
      <dc:creator>CephasO</dc:creator>
      <dc:date>2022-06-13T10:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: HubdB Column Data Can't Be Retrieved in a Gallery Slide Block Syntax</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubdB-Column-Data-Can-t-Be-Retrieved-in-a-Gallery-Slide-Block/m-p/648551#M29075</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/317633"&gt;@CephasO&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You should check your code.&lt;/P&gt;
&lt;P&gt;For example. In your code at the end you are closing your endif like {%.endif %} (with a dot in between)&lt;/P&gt;
&lt;P&gt;This won't work.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, the object you want to display starts with { (curly brackets) but the documentation is telling to start with [ (brackets).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest to check the documentation for &lt;A href="https://developers.hubspot.com/docs/cms/hubl/tags#gallery" target="_blank" rel="noopener"&gt;gallery&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 10:23:15 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubdB-Column-Data-Can-t-Be-Retrieved-in-a-Gallery-Slide-Block/m-p/648551#M29075</guid>
      <dc:creator>Indra</dc:creator>
      <dc:date>2022-06-13T10:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: HubdB Column Data Can't Be Retrieved in a Gallery Slide Block Syntax</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubdB-Column-Data-Can-t-Be-Retrieved-in-a-Gallery-Slide-Block/m-p/648565#M29078</link>
      <description>&lt;P&gt;Thanks Indra,&lt;BR /&gt;&lt;BR /&gt;I wasn't aware of the dot in-between my endif.&lt;BR /&gt;Well, I succeeded in showing the image by d&lt;SPAN&gt;ecoding encoded URL strings back to the original URL like this&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{{ row.image.url|urldecode }}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;I will check the documentation to understand the object syntax you mentioned later.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Anyways, THANKS for spotting the bugs in my code.&lt;/P&gt;</description>
      <pubDate>Mon, 13 Jun 2022 10:47:09 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubdB-Column-Data-Can-t-Be-Retrieved-in-a-Gallery-Slide-Block/m-p/648565#M29078</guid>
      <dc:creator>CephasO</dc:creator>
      <dc:date>2022-06-13T10:47:09Z</dc:date>
    </item>
  </channel>
</rss>

