Fetch HubDb Data into HubSpot Modules
Karan Jalendere
November 13, 2022
Hubspot
First step is to Grab the id from the Hubdb table.
Id which we are going to use is
Each row returns an object. So you can easily access any field data with dot notation.
if you want to make your Hubdb table id option more user-friendly means giving the ability to use to change your Hubdb table from page editor then:
Select Hubdb Option and replace and copy its value and replace hubdb id with its value eg: 5252243 with module.hubdbtable_field
Roger now you can select any table from list to fetch
5252243
<!-- variable contains all unfiltered table data -->
{% set data = hubdb_table_rows(5252243) %}
<!-- Loop through each row -->
{% for row in data %}
<!--Print your each row -->
{{row|pprint}}
{% endfor %}
<!-- variable contains all unfiltered table data -->
{% set hubdbdata = hubdb_table_rows(5244337) %}
<!-- Loop through each row -->
{% for row in hubdbdata %}
<article class="basic-card">
<img src="{{row.image.url}}" alt"{{row.name}}"/>
<h3 class="name">{{row.name}}</h3>
<span class="category">{{row.category}}</span>
</article>
{% endfor %}
<!-- variable contains all unfiltered table data -->
{% set hubdbdata = hubdb_table_rows(module.hubdbtable_field) %}
<!-- Loop through each row -->
{% for row in hubdbdata %}
<article class="basic-card">
<img src="{{row.image.url}}" alt"{{row.name}}"/>
<h3 class="name">{{row.name}}</h3>
<span class="category">{{row.category}}</span>
</article>
{% endfor %}
Socialize Your Business Using Social Media Marketing
Consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi
- Adam Johnson
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
- Quis nostrud exercitation ullamco laboris nisi ut aliquip
- Excepteur sint occaecat cupidatat non proident
- labore et dolore magna aliqua. Ut enim ad minim veniam
Consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
Dont Hesitate To Contact Us
Lorem ipsum dolor sit amet, consecte adipiscing elit, sed do eiusmod tempor incididunt ut labore