CMS Development

LMcColl
Membro

Hubdb tables

resolver

I'm having major trouble with our the display order in our HubDB tables. We are using tables to display videos on our site, and are in the process of trying to add new ones. However, whenever we add a new video to the tables, it is shown at the END of the loop, rather than the beginning. How can we edit the display order? 

 

We added a column to the tables so that we could add the order we'd like them displayed. However, I cannot figure out where/how to edit the HUBl or HTML to get the display order to work. 

 

I have searched the forums for help, and see reference to downloading the current table content to a CSV, re-ordering it and then uploading again from the CSV. But honestly, I don't know how to do that! (I'm new to the Hubspot CMS)

 

At this point, I'm about to delete all our videos just so that I can re-upload them into the correct order, but wanted to try reaching out for some "hail mary" advice first.

0 Avaliação positiva
1 Solução aceita
stefen
Solução
Conselheiro(a) de destaque | Parceiro
Conselheiro(a) de destaque | Parceiro

Hubdb tables

resolver

@LMcColl you should be able to use the `|sort` HubL filter on your HubDB table rows like so:

{% for row in hubdb_table_rows(123456)|sort(false, false, "column_name_to_sort_by") %}
{% endfor%}

You could also use a query filter directly:

{% for row in hubdb_table_rows(123456, "&orderBy=column_name")%}
{% endfor %}

 

Stefen Phelps, Community Champion, Kelp Web Developer

Exibir solução no post original

1 Resposta 1
stefen
Solução
Conselheiro(a) de destaque | Parceiro
Conselheiro(a) de destaque | Parceiro

Hubdb tables

resolver

@LMcColl you should be able to use the `|sort` HubL filter on your HubDB table rows like so:

{% for row in hubdb_table_rows(123456)|sort(false, false, "column_name_to_sort_by") %}
{% endfor%}

You could also use a query filter directly:

{% for row in hubdb_table_rows(123456, "&orderBy=column_name")%}
{% endfor %}

 

Stefen Phelps, Community Champion, Kelp Web Developer