<?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 Hide a table row/cell if it is empty in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/Hide-a-table-row-cell-if-it-is-empty/m-p/438673#M23158</link>
    <description>&lt;P&gt;Hello devs! I am trying to figure out a way to hide a hubdb table row if it's empty. My client wants to be able to remove the dates from a webinar table. Ideally the span tag will be hidden if the date is cleared (right now if the date is cleared, it defaults to today's date).&amp;nbsp; I've figured out how to do this for another hubl module (eg: if button text is empty, hide button), but since this one is pulling data directly from a table that method doesn't quite work.&amp;nbsp; I have included my table loop below.&amp;nbsp; I think this can be done with an if statement, but I'm pretty new to hubdb table loops, so any help will be much appreciated. Thanks! (edited to show the english version of this table)&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;	{% for item in webinars %}

			&amp;lt;div class="col-4"&amp;gt;
				&amp;lt;div class="card"&amp;gt;
					&amp;lt;div class="card-thumbnail"&amp;gt;
						&amp;lt;img src="{{ item.image.url }}" alt=""&amp;gt;
					&amp;lt;/div&amp;gt;&amp;lt;!--card-thumbnail end--&amp;gt;
					&amp;lt;div class="card-info"&amp;gt;
						&amp;lt;span class="date"&amp;gt;{{ item.date|datetimeformat('%B %e, %Y') }}&amp;lt;/span&amp;gt;
						&amp;lt;h2&amp;gt;{{ item.name }}&amp;lt;/h2&amp;gt;
						&amp;lt;div class="summary"&amp;gt;{{ item.summary }}&amp;lt;/div&amp;gt;
						&amp;lt;a href="{{ item.link }}" title="" class="lnk-default"&amp;gt;Agenda&amp;lt;/a&amp;gt;
					&amp;lt;/div&amp;gt;&amp;lt;!--card-info end--&amp;gt;
				&amp;lt;/div&amp;gt;&amp;lt;!--card end--&amp;gt;
			&amp;lt;/div&amp;gt;
			{% endfor %}
		&amp;lt;/div&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 18 May 2021 15:18:09 GMT</pubDate>
    <dc:creator>pixelilly</dc:creator>
    <dc:date>2021-05-18T15:18:09Z</dc:date>
    <item>
      <title>Hide a table row/cell if it is empty</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Hide-a-table-row-cell-if-it-is-empty/m-p/438673#M23158</link>
      <description>&lt;P&gt;Hello devs! I am trying to figure out a way to hide a hubdb table row if it's empty. My client wants to be able to remove the dates from a webinar table. Ideally the span tag will be hidden if the date is cleared (right now if the date is cleared, it defaults to today's date).&amp;nbsp; I've figured out how to do this for another hubl module (eg: if button text is empty, hide button), but since this one is pulling data directly from a table that method doesn't quite work.&amp;nbsp; I have included my table loop below.&amp;nbsp; I think this can be done with an if statement, but I'm pretty new to hubdb table loops, so any help will be much appreciated. Thanks! (edited to show the english version of this table)&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;	{% for item in webinars %}

			&amp;lt;div class="col-4"&amp;gt;
				&amp;lt;div class="card"&amp;gt;
					&amp;lt;div class="card-thumbnail"&amp;gt;
						&amp;lt;img src="{{ item.image.url }}" alt=""&amp;gt;
					&amp;lt;/div&amp;gt;&amp;lt;!--card-thumbnail end--&amp;gt;
					&amp;lt;div class="card-info"&amp;gt;
						&amp;lt;span class="date"&amp;gt;{{ item.date|datetimeformat('%B %e, %Y') }}&amp;lt;/span&amp;gt;
						&amp;lt;h2&amp;gt;{{ item.name }}&amp;lt;/h2&amp;gt;
						&amp;lt;div class="summary"&amp;gt;{{ item.summary }}&amp;lt;/div&amp;gt;
						&amp;lt;a href="{{ item.link }}" title="" class="lnk-default"&amp;gt;Agenda&amp;lt;/a&amp;gt;
					&amp;lt;/div&amp;gt;&amp;lt;!--card-info end--&amp;gt;
				&amp;lt;/div&amp;gt;&amp;lt;!--card end--&amp;gt;
			&amp;lt;/div&amp;gt;
			{% endfor %}
		&amp;lt;/div&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 May 2021 15:18:09 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Hide-a-table-row-cell-if-it-is-empty/m-p/438673#M23158</guid>
      <dc:creator>pixelilly</dc:creator>
      <dc:date>2021-05-18T15:18:09Z</dc:date>
    </item>
    <item>
      <title>Re: Hide a table row/cell if it is empty</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Hide-a-table-row-cell-if-it-is-empty/m-p/438996#M23179</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/59415"&gt;@pixelilly&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think If statment is definitely the way. Can you give this a shot and see if this works?&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":crossed_fingers:"&gt;🤞&lt;/span&gt;&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;{% if item.date  %}
&amp;lt;span class="date"&amp;gt;{{ item.date|datetimeformat('%B %e, %Y') }}&amp;lt;/span&amp;gt;
{% endif %}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 13:12:33 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Hide-a-table-row-cell-if-it-is-empty/m-p/438996#M23179</guid>
      <dc:creator>jonchim</dc:creator>
      <dc:date>2021-05-19T13:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Hide a table row/cell if it is empty</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Hide-a-table-row-cell-if-it-is-empty/m-p/439009#M23180</link>
      <description>&lt;P&gt;That almost worked! It hid the date even though there was data in the table cell.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 13:40:38 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Hide-a-table-row-cell-if-it-is-empty/m-p/439009#M23180</guid>
      <dc:creator>pixelilly</dc:creator>
      <dc:date>2021-05-19T13:40:38Z</dc:date>
    </item>
    <item>
      <title>Re: Hide a table row/cell if it is empty</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Hide-a-table-row-cell-if-it-is-empty/m-p/439015#M23181</link>
      <description>&lt;P&gt;Got it! can you try row.date instead of item?&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 13:55:10 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Hide-a-table-row-cell-if-it-is-empty/m-p/439015#M23181</guid>
      <dc:creator>jonchim</dc:creator>
      <dc:date>2021-05-19T13:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: Hide a table row/cell if it is empty</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Hide-a-table-row-cell-if-it-is-empty/m-p/439033#M23182</link>
      <description>&lt;P&gt;That also hid it. I feel like it should be if is not empty but the syntax is tripping me up.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 14:14:29 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Hide-a-table-row-cell-if-it-is-empty/m-p/439033#M23182</guid>
      <dc:creator>pixelilly</dc:creator>
      <dc:date>2021-05-19T14:14:29Z</dc:date>
    </item>
    <item>
      <title>Re: Hide a table row/cell if it is empty</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Hide-a-table-row-cell-if-it-is-empty/m-p/439044#M23183</link>
      <description>&lt;P&gt;Hmm interesting, are you using the date picker in the hubdb table?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 14:31:11 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Hide-a-table-row-cell-if-it-is-empty/m-p/439044#M23183</guid>
      <dc:creator>jonchim</dc:creator>
      <dc:date>2021-05-19T14:31:11Z</dc:date>
    </item>
    <item>
      <title>Re: Hide a table row/cell if it is empty</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Hide-a-table-row-cell-if-it-is-empty/m-p/439046#M23184</link>
      <description>&lt;P&gt;Yep, I've included a screenshot.&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2021-05-19 at 10.33.27 AM.png" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/42906i96A833AEF91FE796/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2021-05-19 at 10.33.27 AM.png" alt="Screen Shot 2021-05-19 at 10.33.27 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 14:33:55 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Hide-a-table-row-cell-if-it-is-empty/m-p/439046#M23184</guid>
      <dc:creator>pixelilly</dc:creator>
      <dc:date>2021-05-19T14:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: Hide a table row/cell if it is empty</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Hide-a-table-row-cell-if-it-is-empty/m-p/439048#M23185</link>
      <description>&lt;P&gt;Wait maybe I misunderstood the initial post, do you want to hide everything if there is no date selected in HubDB? or just the date wrapped in the span?&lt;/P&gt;</description>
      <pubDate>Wed, 19 May 2021 14:43:09 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Hide-a-table-row-cell-if-it-is-empty/m-p/439048#M23185</guid>
      <dc:creator>jonchim</dc:creator>
      <dc:date>2021-05-19T14:43:09Z</dc:date>
    </item>
    <item>
      <title>Re: Hide a table row/cell if it is empty</title>
      <link>https://community.hubspot.com/t5/CMS-Development/Hide-a-table-row-cell-if-it-is-empty/m-p/440293#M23233</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/59415"&gt;@pixelilly&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-sheets-value="{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:&amp;quot;Create Boolean option and add Somthing like this:\r\n\r\n{% if item.hide_dates %}\r\n  {{ item.date|datetimeformat('%B %e, %Y') }}\r\n{% endif %}\r\n\r\nclient easliy manange date hide show accordingly &amp;quot;}" data-sheets-userformat="{&amp;quot;2&amp;quot;:5053,&amp;quot;3&amp;quot;:{&amp;quot;1&amp;quot;:0},&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;6&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;7&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;8&amp;quot;:{&amp;quot;1&amp;quot;:[{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0,&amp;quot;5&amp;quot;:{&amp;quot;1&amp;quot;:2,&amp;quot;2&amp;quot;:0}},{&amp;quot;1&amp;quot;:0,&amp;quot;2&amp;quot;:0,&amp;quot;3&amp;quot;:3},{&amp;quot;1&amp;quot;:1,&amp;quot;2&amp;quot;:0,&amp;quot;4&amp;quot;:1}]},&amp;quot;10&amp;quot;:2,&amp;quot;11&amp;quot;:4,&amp;quot;12&amp;quot;:0,&amp;quot;15&amp;quot;:&amp;quot;Arial&amp;quot;}"&gt;Create Boolean option and add Somthing like this: &lt;BR /&gt;&lt;BR /&gt;{% if item.hide_dates %} &lt;BR /&gt;{{ item.date|datetimeformat('%B %e, %Y') }} &lt;BR /&gt;{% endif %} &lt;BR /&gt;&lt;BR /&gt;Client can easliy manange date hide show accordingly.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;Hope this helps!&lt;BR /&gt;&lt;SPAN&gt;If we were able to answer your query, kindly help the community by marking it as a solution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks and Regards.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 24 May 2021 12:56:57 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/Hide-a-table-row-cell-if-it-is-empty/m-p/440293#M23233</guid>
      <dc:creator>webdew</dc:creator>
      <dc:date>2021-05-24T12:56:57Z</dc:date>
    </item>
  </channel>
</rss>

