<ul>
{% for group in hubdb_table_rows(dynamic_page_hubdb_table_id,"&orderBy=episode_number&orderBy=series_order")|groupby('series_name') %}
<li>
<ul>
{% for row in group.list %}
{% if loop.first %}{{ row.series_name.name }} {% endif %}
<li><a href="{{ request.path }}/{{ row.hs_path }}">{{ row.hs_name }} </a></li>
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
Hi there, I want to groupby on a select column type in Hubdb, which it does, but it turns the whole group into a string. As a work around I just find the value on the first iteration of the loop. But I’d like to show the dropdown name with the {{group.grouper}} but that won’t work, and then also order the groups by the Order Id value in said select column. I found this to only work if you use a string or number fields, and do an orderby with the ‘OrderBy’ query attribute. I feel like I should be able to group by the dropdown name, and use the hubdb select order to order the groups? ‘series_name’ is the select column in my hubdb table. I removed the group.grouper, and replaced it with a for loop to show the select column ‘series_name.name’. Any help would greatly appreacated.
P.S. I’m using a dynamic table