CMS Development

rainism
Member

Print rows of one table on dynamic page of another

SOLVE

Hello.
I have two HubDB tables - one for locations and one for buildings. Each table has its own properies and fields.
I need to print rows of the buildings table on a dynamic page for locations. Is there a way to print all content of the buildings table? Is there a way to print only a specified number of rows?

0 Upvotes
1 Accepted solution
alyssamwilie
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Print rows of one table on dynamic page of another

SOLVE

You can use a regular row for loop to print them.

{% for row in hubdb_table_rows(<tableId>, <filterQuery>) %}
{% endfor %}

If you want to print only certain rows depending on the page you would want to use a foreign id to link the two tables.

https://designers.hubspot.com/tutorials/how-to-join-hubdb-tables

Alyssa Wilie
Web Developer
LyntonWeb


If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.

View solution in original post

0 Upvotes
2 Replies 2
alyssamwilie
Solution
Recognized Expert | Elite Partner
Recognized Expert | Elite Partner

Print rows of one table on dynamic page of another

SOLVE

You can use a regular row for loop to print them.

{% for row in hubdb_table_rows(<tableId>, <filterQuery>) %}
{% endfor %}

If you want to print only certain rows depending on the page you would want to use a foreign id to link the two tables.

https://designers.hubspot.com/tutorials/how-to-join-hubdb-tables

Alyssa Wilie
Web Developer
LyntonWeb


If this answer solved your question, please mark it as the solution.

Alyssa Wilie Profile Image

Alyssa Wilie

Web Developerat Lynton

Learn HubL | Get Marketing Insights

HubSpot Elite Solutions Partner
Lynton's HubSpot theme Rubric now available. Click to download.
0 Upvotes
rainism
Member

Print rows of one table on dynamic page of another

SOLVE

It helped, thank you!

0 Upvotes