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 Respuestas 0

0 Respuestas

Aún no hay respuestas para esta publicación.

Por ahora, ningún usuario ha respondido a esta publicación. Vuelve pronto para ver si alguien tiene la solución o envía tu propia respuesta si sabes cómo ayudar. Cada grano de arena cuenta.

Responder esta publicación

¿Necesitas ayuda para responder? Echa un vistazo a las pautas de la comunidad