<?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 dynamic rows generating in CMS Development</title>
    <link>https://community.hubspot.com/t5/CMS-Development/HubDB-dynamic-rows-generating/m-p/722032#M31573</link>
    <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/353188"&gt;@VoytechMedia&lt;/a&gt;&amp;nbsp;I see you found the answer already. Yes, it's basically the same as how you query when using hubl functions. Just add the query to the end of the request and it should work the same way.&lt;/P&gt;</description>
    <pubDate>Wed, 23 Nov 2022 09:16:39 GMT</pubDate>
    <dc:creator>dannio</dc:creator>
    <dc:date>2022-11-23T09:16:39Z</dc:date>
    <item>
      <title>HubDB dynamic rows generating</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubDB-dynamic-rows-generating/m-p/721384#M31543</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am wondering if it would be possible to generate items from my HubDB table after certain button being clicked.&lt;BR /&gt;To be more specific - I do not want to generate all the items rightaway and display/hide them w css class but dynamically generate them after button being clicked. This way my webpage is optimized.&lt;BR /&gt;&lt;BR /&gt;I built a blog with categories once but all the thumbnails are generated immediately and being shown/hidden after filtering. I am looking for more optimal way to build such blog/resources page&amp;nbsp;&lt;A href="https://www.ziflow.com/blog" target="_blank" rel="noopener"&gt;https://www.ziflow.com/blog&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Another example is here&amp;nbsp;&lt;A href="https://www.toriihq.com/resources" target="_blank"&gt;https://www.toriihq.com/resources&lt;/A&gt;&amp;nbsp;but again - elements are loaded just after DOM is loaded and I want them to load dynamically.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 09:26:44 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubDB-dynamic-rows-generating/m-p/721384#M31543</guid>
      <dc:creator>VoytechMedia</dc:creator>
      <dc:date>2022-11-22T09:26:44Z</dc:date>
    </item>
    <item>
      <title>Re: HubDB dynamic rows generating</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubDB-dynamic-rows-generating/m-p/721700#M31553</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/353188"&gt;@VoytechMedia&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Thanks for reaching out! Let's see if we can get the conversation going. Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/133"&gt;@stefen&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/185694"&gt;@SJaeger&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/20405"&gt;@himanshurauthan&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/16537"&gt;@dannio&lt;/a&gt;, do&amp;nbsp;you have any experience with projects like&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/353188"&gt;@VoytechMedia&lt;/a&gt;&amp;nbsp;is describing?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you! — Jaycee&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 17:22:28 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubDB-dynamic-rows-generating/m-p/721700#M31553</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2022-11-22T17:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: HubDB dynamic rows generating</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubDB-dynamic-rows-generating/m-p/721756#M31557</link>
      <description>&lt;P&gt;You could do something with ajax and the &lt;A href="https://legacydocs.hubspot.com/docs/methods/hubdb/v2/get_table_rows" target="_blank" rel="noopener"&gt;HubDB api&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;
&lt;DIV&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="profile2022a" style="width: 100px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/71500iE96AB1F9E9E277B9/image-size/small?v=v2&amp;amp;px=200" role="button" title="profile2022a" alt="profile2022a" /&gt;&lt;/span&gt;&lt;STRONG&gt;&lt;FONT size="5"&gt;Barry Grennan&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;A href="https://www.seoanseo.ca?utm_source=HubSpotCommunity" target="_blank" rel="nofollow noopener noreferrer"&gt;Freelance HubSpot CMS Developer&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://www.seoanseo.ca?utm_source=HubSpotCommunity" target="_blank" rel="nofollow noopener noreferrer"&gt;Website&lt;/A&gt; | &lt;A href="https://www.seoanseo.ca/#contact?utm_source=HubSpotCommunity" target="_blank" rel="nofollow noopener noreferrer"&gt;Contact&lt;/A&gt; | &lt;A href="https://www.linkedin.com/in/barrygrennan" target="_blank" rel="nofollow noopener noreferrer"&gt;LinkedIn&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Nov 2022 18:52:20 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubDB-dynamic-rows-generating/m-p/721756#M31557</guid>
      <dc:creator>BarryGrennan</dc:creator>
      <dc:date>2022-11-22T18:52:20Z</dc:date>
    </item>
    <item>
      <title>Re: HubDB dynamic rows generating</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubDB-dynamic-rows-generating/m-p/721887#M31564</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/353188"&gt;@VoytechMedia&lt;/a&gt;&amp;nbsp; you can use an ajax call to grab the hubdb rows via:&lt;BR /&gt;&lt;STRONG class=""&gt;GET&amp;nbsp;&lt;/STRONG&gt;/cms/v3/hubdb/tables/{tableIdOrName}/rows&lt;CODE class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class="" data-content="true"&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;A href="https://developers.hubspot.com/docs/api/cms/hubdb" target="_blank"&gt;https://developers.hubspot.com/docs/api/cms/hubdb&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;This requires no authentication if the table is set to public. If it's not public, it will require a key, in which case you will need a serverless function to make the call as you will need to hide your authentication key&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once you get the data via the call, just append HTML to the parent container. something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&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;html = "&amp;lt;div&amp;gt;" + data.columns['name'] + "&amp;lt;/div&amp;gt;";
parent_container.insertAdjacentHTML('beforeend', html)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 01:41:46 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubDB-dynamic-rows-generating/m-p/721887#M31564</guid>
      <dc:creator>dannio</dc:creator>
      <dc:date>2022-11-23T01:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: HubDB dynamic rows generating</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubDB-dynamic-rows-generating/m-p/721916#M31567</link>
      <description>&lt;P&gt;&amp;nbsp;Hey &lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/353188"&gt;@VoytechMedia&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Before looking at a JS solution my first thought would be to look into &lt;A href="https://developers.hubspot.com/docs/cms/guides/speed/lazy-loading" target="_blank" rel="noopener"&gt;lazy loading&lt;/A&gt; or potentially just off loading all of the concern to the browser!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I mean by that is that most modern browsers will actually lazy load an image if its parent container is hidden! So you can hide the content and this tells the browser "this is a non-blocking resource" and should be deprioritized in the &lt;A href="https://developer.mozilla.org/en-US/docs/Web/Performance/Critical_rendering_path" target="_blank" rel="noopener"&gt;critical rendering path&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-unlink="true"&gt;&lt;A href="http://jsfiddle.net/tnk3j08s/" target="_blank" rel="noopener"&gt;This example shows that concept in action.&amp;nbsp;&lt;/A&gt;&lt;/P&gt;
&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-unlink="true"&gt;&lt;A href="https://developer.mozilla.org/en-US/docs/Web/Performance/Lazy_loading" target="_blank" rel="noopener"&gt;Also see lazy loading on MDN.&lt;/A&gt;&lt;/P&gt;
&lt;P data-unlink="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P data-unlink="true"&gt;Thoughts?&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 03:02:05 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubDB-dynamic-rows-generating/m-p/721916#M31567</guid>
      <dc:creator>Kevin-C</dc:creator>
      <dc:date>2022-11-23T03:02:05Z</dc:date>
    </item>
    <item>
      <title>Re: HubDB dynamic rows generating</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubDB-dynamic-rows-generating/m-p/722013#M31569</link>
      <description>&lt;P&gt;Thank you very much for response&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/73772"&gt;@Kevin-C&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I already implemented similar solution here&amp;nbsp;&lt;A href="https://www.ziflow.com/blog" target="_blank" rel="noopener"&gt;https://www.ziflow.com/blog&lt;/A&gt;&lt;BR /&gt;Where we had about 150+ blog posts available but it is causing to render tremendously (in my opinion) long HTML code - even if content is lazy loaded.&amp;nbsp;&lt;BR /&gt;This page have 400 inbound links as the final outcome which apparently may cause its SEO being not optimal.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Note from Hubspot while examining above page with Optimize tab:&lt;BR /&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;STRONG&gt;Page has less than&amp;nbsp;300&amp;nbsp;outbound links&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;Too many outbound links creates a bad experience for your visitors and may cause search engines to view your page as low-quality or as spam. Your page has&amp;nbsp;401&amp;nbsp;links (including your navigation menus, for example). Aim for less than&amp;nbsp;300&amp;nbsp;outbound links."&lt;BR /&gt;&lt;BR /&gt;I think your solution is great for pages with less content, what do you think? Or shouldn't I care that much about it?&lt;BR /&gt;Much thanks for helping me!! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 23 Nov 2022 08:35:25 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubDB-dynamic-rows-generating/m-p/722013#M31569</guid>
      <dc:creator>VoytechMedia</dc:creator>
      <dc:date>2022-11-23T08:35:25Z</dc:date>
    </item>
    <item>
      <title>Re: HubDB dynamic rows generating</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubDB-dynamic-rows-generating/m-p/722016#M31570</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 08:38:33 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubDB-dynamic-rows-generating/m-p/722016#M31570</guid>
      <dc:creator>VoytechMedia</dc:creator>
      <dc:date>2022-11-23T08:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: HubDB dynamic rows generating</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubDB-dynamic-rows-generating/m-p/722024#M31572</link>
      <description>&lt;P&gt;Thank you for response&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/16537"&gt;@dannio&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;This looks like the way to go but my another question would be - Is it possible to parametrize these HubDB requests?&lt;BR /&gt;For example if I had table columns such as ID, Name and Category of item. I would like only grab items of "Tech" Category and Name containing f.e "ex" letters.&amp;nbsp;&lt;BR /&gt;I know I could filter all the JSON data once I request rows but more optimal would be adding parameters to request itself.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;EDIT: I see that adding queries is possible here&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows" target="_blank" rel="noopener"&gt;https://developers.hubspot.com/docs/api/cms/hubdb#filtering-and-sorting-table-rows&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;So for example&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;/cms/v3/hubdb/tables/{tableIdOrName}/rows?name__contains=ex&amp;amp;category__eq=Tech&lt;/STRONG&gt; should make it work.&lt;BR /&gt;&lt;BR /&gt;Additionally, is it possible to limit amount of requested rows for example to 10? From 5th to 15th&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 09:52:35 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubDB-dynamic-rows-generating/m-p/722024#M31572</guid>
      <dc:creator>VoytechMedia</dc:creator>
      <dc:date>2022-11-23T09:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: HubDB dynamic rows generating</title>
      <link>https://community.hubspot.com/t5/CMS-Development/HubDB-dynamic-rows-generating/m-p/722032#M31573</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/353188"&gt;@VoytechMedia&lt;/a&gt;&amp;nbsp;I see you found the answer already. Yes, it's basically the same as how you query when using hubl functions. Just add the query to the end of the request and it should work the same way.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 09:16:39 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/CMS-Development/HubDB-dynamic-rows-generating/m-p/722032#M31573</guid>
      <dc:creator>dannio</dc:creator>
      <dc:date>2022-11-23T09:16:39Z</dc:date>
    </item>
  </channel>
</rss>

