CMS Development

LMcColl
メンバー

Hubdb tables

解決

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 いいね!
1件の承認済みベストアンサー
stefen
解決策
キーアドバイザー | Solutions Partner
キーアドバイザー | Solutions Partner

Hubdb tables

解決

@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

元の投稿で解決策を見る

1件の返信
stefen
解決策
キーアドバイザー | Solutions Partner
キーアドバイザー | Solutions Partner

Hubdb tables

解決

@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