Share Your Work

Katelyn_Eklund
HubSpot Employee
HubSpot Employee

Workaround for Reordering HubDB Table Rows

At the moment it is not possible to reorder HubDB table rows to a custom order without having to export the table to a CSV/XLS file, making the order change in Excel and then re-import the table into HubSpot. 

 

One potential workaround for this function is to create a new column in your HubDB table called, for example, 'Listing Order' and then sort your table rows by this column. Set the type for this column as 'Number' then edit the HTML where your HubL for loop is contained to include the following:

 

{% set table = hubdb_table_rows(module.select_table)  %}

{% for row in table|sort(False, False, 'listing_order')  %}

{# HTML #}

{% endfor %}


By giving each row a number within your new 'Listing Order' table column your table will now display on each website page matching the number order that is set.

0 Replies 0

0 Replies

No replies on this post just yet

No one has replied to this post quite yet. Check back soon to see if someone has a solution, or submit your own reply if you know how to help! Karma is real.

Reply to post

Need help replying? Check out our Community Guidelines