<?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 Re: HubDB Selection Field in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/HubDB-Selection-Field/m-p/426388#M22326</link>
    <description>&lt;P&gt;This is the section of code for the resource listing part of the module, your addition is in bold.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;div class="resource-body"&amp;gt;&lt;BR /&gt;{% set table = hubdb_table_rows(3411941, queryparam) %}&lt;BR /&gt;&amp;lt;div class="rlpp-grid rlpp-grid-3col"&amp;gt;&lt;BR /&gt;{% if table == [] %}&lt;BR /&gt;&amp;lt;p class='align-center' style="color: #2a2a2a; width: 100%;"&amp;gt;Sorry, no listings found for that Search. Try changing your filter and search again.&amp;lt;/p&amp;gt;&lt;BR /&gt;{% else %}&lt;BR /&gt;{% for row in table %}&lt;/P&gt;&lt;P&gt;&amp;lt;div class="resource-listing"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;a href=" {{ row["link"] }} " target="_blank" style="color: #fff;"&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;lt;div class="resource--format__icon"&amp;gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;{% set table = hubdb_table_rows(module.hubdbtable_field) %}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;{% for row in table %}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;{% if row.format.name|lower == "download" %}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;lt;i class="fas fa-download"&amp;gt;&amp;lt;/i&amp;gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;{% else %}&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;{% endif %}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;{% endfor %}&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;div class="image-container"&amp;gt;&amp;lt;img src="{{ row["image"].url}}"&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;div class="category-display-container" style="color: #dd083b;"&amp;gt;{{ row["type"].name }}&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;h4 style="color: #2a2a2a; text-align: center;"&amp;gt;{{ row["title"] }}&amp;lt;/h4&amp;gt;&lt;BR /&gt;&amp;lt;p style="color: #2a2a2a; text-align: center;"&amp;gt;{{ row["description"] }}&amp;lt;/p&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;div class="view-button-container"&amp;gt;&lt;BR /&gt;&amp;lt;button class="view-button"&amp;gt;View Resource&amp;lt;/button&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/a&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&lt;BR /&gt;{% endfor %}&lt;BR /&gt;{% endif %}&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;div class="loadmore-container"&amp;gt;&lt;BR /&gt;&amp;lt;a href="#" id="loadMore"&amp;gt;Load More&amp;lt;/a&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;lt;/div&amp;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;</description>
    <pubDate>Fri, 09 Apr 2021 14:11:00 GMT</pubDate>
    <dc:creator>JLanfear</dc:creator>
    <dc:date>2021-04-09T14:11:00Z</dc:date>
    <item>
      <title>HubDB Selection Field</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubDB-Selection-Field/m-p/426305#M22309</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having some trouble with the HubDB Selection field, my basic idea is when we add new data to the HubDB we select a 'Format' that format can either be a download, a course, a video etc...&amp;nbsp; What I am wanting to do is display an icon depending on what has been selected in that column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to loop through the 'format' column for each row, check what the selection is and if it's 'Download' display a download icon, and so on and so forth.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be really appreciated. Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 11:17:20 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubDB-Selection-Field/m-p/426305#M22309</guid>
      <dc:creator>JLanfear</dc:creator>
      <dc:date>2021-04-09T11:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: HubDB Selection Field</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubDB-Selection-Field/m-p/426319#M22312</link>
      <description>&lt;P&gt;Hey!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From what I understand, you currently set a "Format" field which is a dropdown select. From this field, you want to retrieve what is the data selected from this field and show an icon if this is the case right?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Well, follow this kind of logic and it should work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{% set table = hubdb_table_rows(module.hubdbtable_field) %}
{% for row in table %}
{% if row.format.name|lower == "download" %}
// If format = download
{% else %}
// If format != download
{% endif %}
// Other code
{% endfor %}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Example with some HTML:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{% set table = hubdb_table_rows(module.hubdbtable_field) %}
&amp;lt;div class='container'&amp;gt;
  &amp;lt;div class='row-fluid'&amp;gt;
    &amp;lt;h1&amp;gt;HubDB Example&amp;lt;/h1&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
&amp;lt;div class='container'&amp;gt;
  &amp;lt;div class='row-fluid'&amp;gt;
    {% for row in table %}
    &amp;lt;div class='span4 columns'&amp;gt;
      &amp;lt;div class='category'&amp;gt;
        {% if row.format.name|lower == "download" %}&amp;lt;i class='download'&amp;gt;Icon&amp;lt;/i&amp;gt;{% else %}{{ row.format.name }}{% endif %}
      &amp;lt;/div&amp;gt;
      &amp;lt;h2&amp;gt;{{ row.name }}&amp;lt;/h2&amp;gt;
    &amp;lt;/div&amp;gt;
    {% endfor %}
  &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 12:02:56 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubDB-Selection-Field/m-p/426319#M22312</guid>
      <dc:creator>LucBenayoun</dc:creator>
      <dc:date>2021-04-09T12:02:56Z</dc:date>
    </item>
    <item>
      <title>Re: HubDB Selection Field</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubDB-Selection-Field/m-p/426324#M22314</link>
      <description>&lt;P&gt;Don't think that works, think you are on the right path though,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;basically, I have a column in my hubdb where when we add new content you select either: Download, Article, Podcast, Video, Website, Course or Interview. On the resource (see below) I want to print an icon depending on what is selected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the if condition to see if the name is download is right but that just prints 7 download icons rather than one because there are seven rows that have selected download.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JLanfear_0-1617970688177.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/40669iC98DBDA37C354141/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JLanfear_0-1617970688177.png" alt="JLanfear_0-1617970688177.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 12:18:55 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubDB-Selection-Field/m-p/426324#M22314</guid>
      <dc:creator>JLanfear</dc:creator>
      <dc:date>2021-04-09T12:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: HubDB Selection Field</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubDB-Selection-Field/m-p/426339#M22316</link>
      <description>&lt;P&gt;I'm not sure to fully understand. I tested with a HubDB, here are my screenshots.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Capture d’écran 2021-04-09 à 14.36.36.png" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/40676i17986A064FFC16BC/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture d’écran 2021-04-09 à 14.36.36.png" alt="Capture d’écran 2021-04-09 à 14.36.36.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Capture d’écran 2021-04-09 à 14.36.19.png" style="width: 863px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/40677iCD830104652347CD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture d’écran 2021-04-09 à 14.36.19.png" alt="Capture d’écran 2021-04-09 à 14.36.19.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Tell me what I'm missing and I'll be happy to help! &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 12:38:11 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubDB-Selection-Field/m-p/426339#M22316</guid>
      <dc:creator>LucBenayoun</dc:creator>
      <dc:date>2021-04-09T12:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: HubDB Selection Field</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubDB-Selection-Field/m-p/426376#M22322</link>
      <description>&lt;P&gt;Sorry man, it's probably me, when I input your code this is what I get.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JLanfear_0-1617976517288.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/40679iDFCF58577B68B8D4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JLanfear_0-1617976517288.png" alt="JLanfear_0-1617976517288.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Am I supposed to change some values to my own? Again sorry not well versed in this department.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 13:56:19 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubDB-Selection-Field/m-p/426376#M22322</guid>
      <dc:creator>JLanfear</dc:creator>
      <dc:date>2021-04-09T13:56:19Z</dc:date>
    </item>
    <item>
      <title>Re: HubDB Selection Field</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubDB-Selection-Field/m-p/426382#M22324</link>
      <description>&lt;P&gt;I think it should be better that you paste you module code in here so I can take a look but you're probably looping in another loop &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 14:03:29 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubDB-Selection-Field/m-p/426382#M22324</guid>
      <dc:creator>LucBenayoun</dc:creator>
      <dc:date>2021-04-09T14:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: HubDB Selection Field</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubDB-Selection-Field/m-p/426388#M22326</link>
      <description>&lt;P&gt;This is the section of code for the resource listing part of the module, your addition is in bold.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;div class="resource-body"&amp;gt;&lt;BR /&gt;{% set table = hubdb_table_rows(3411941, queryparam) %}&lt;BR /&gt;&amp;lt;div class="rlpp-grid rlpp-grid-3col"&amp;gt;&lt;BR /&gt;{% if table == [] %}&lt;BR /&gt;&amp;lt;p class='align-center' style="color: #2a2a2a; width: 100%;"&amp;gt;Sorry, no listings found for that Search. Try changing your filter and search again.&amp;lt;/p&amp;gt;&lt;BR /&gt;{% else %}&lt;BR /&gt;{% for row in table %}&lt;/P&gt;&lt;P&gt;&amp;lt;div class="resource-listing"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;a href=" {{ row["link"] }} " target="_blank" style="color: #fff;"&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;lt;div class="resource--format__icon"&amp;gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;{% set table = hubdb_table_rows(module.hubdbtable_field) %}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;{% for row in table %}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;{% if row.format.name|lower == "download" %}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&amp;lt;i class="fas fa-download"&amp;gt;&amp;lt;/i&amp;gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;{% else %}&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;{% endif %}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;{% endfor %}&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;div class="image-container"&amp;gt;&amp;lt;img src="{{ row["image"].url}}"&amp;gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;div class="category-display-container" style="color: #dd083b;"&amp;gt;{{ row["type"].name }}&amp;lt;/div&amp;gt;&lt;BR /&gt;&amp;lt;h4 style="color: #2a2a2a; text-align: center;"&amp;gt;{{ row["title"] }}&amp;lt;/h4&amp;gt;&lt;BR /&gt;&amp;lt;p style="color: #2a2a2a; text-align: center;"&amp;gt;{{ row["description"] }}&amp;lt;/p&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;div class="view-button-container"&amp;gt;&lt;BR /&gt;&amp;lt;button class="view-button"&amp;gt;View Resource&amp;lt;/button&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;/a&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&lt;BR /&gt;{% endfor %}&lt;BR /&gt;{% endif %}&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;div class="loadmore-container"&amp;gt;&lt;BR /&gt;&amp;lt;a href="#" id="loadMore"&amp;gt;Load More&amp;lt;/a&amp;gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;lt;/div&amp;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;</description>
      <pubDate>Fri, 09 Apr 2021 14:11:00 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubDB-Selection-Field/m-p/426388#M22326</guid>
      <dc:creator>JLanfear</dc:creator>
      <dc:date>2021-04-09T14:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: HubDB Selection Field</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubDB-Selection-Field/m-p/426390#M22327</link>
      <description>&lt;P&gt;Okay that's what I was thinking. By copy/paste my code you're looping inside an existing loop your created before. Replace all HubL code with this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{% set table = hubdb_table_rows(3411941, queryparam) %}
&amp;lt;div class="rlpp-grid rlpp-grid-3col"&amp;gt;
  {% if table == [] %}
  &amp;lt;p class='align-center' style="color: #2a2a2a; width: 100%;"&amp;gt;Sorry, no listings found for that Search. Try changing your filter and search again.&amp;lt;/p&amp;gt;
  {% else %}
  {% for row in table %}
  &amp;lt;div class="resource-listing"&amp;gt;
    &amp;lt;a href=" {{ row["link"] }} " target="_blank" style="color: #fff;"&amp;gt;
      &amp;lt;div class="resource--format__icon"&amp;gt;
        {% if row.format.name|lower == "download" %}
        &amp;lt;i class="fas fa-download"&amp;gt;Icon&amp;lt;/i&amp;gt;
        // Other code like name and so on
        {% else %}
        // Other code like name and so on
        {% endif %}
      &amp;lt;/div&amp;gt;
    &amp;lt;/a&amp;gt;
  &amp;lt;/div&amp;gt;
  {% endfor %}
  {% endif %}
&amp;lt;/div&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":fire:"&gt;🔥&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 14:21:57 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubDB-Selection-Field/m-p/426390#M22327</guid>
      <dc:creator>LucBenayoun</dc:creator>
      <dc:date>2021-04-09T14:21:57Z</dc:date>
    </item>
    <item>
      <title>Re: HubDB Selection Field</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubDB-Selection-Field/m-p/426401#M22328</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank man you did it! Really appreciate your help, you're a lifesaver!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JLanfear_1-1617979063280.png" style="width: 400px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/40682iF939828AF1B41ABE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JLanfear_1-1617979063280.png" alt="JLanfear_1-1617979063280.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 14:37:50 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubDB-Selection-Field/m-p/426401#M22328</guid>
      <dc:creator>JLanfear</dc:creator>
      <dc:date>2021-04-09T14:37:50Z</dc:date>
    </item>
  </channel>
</rss>

