Check if data in HubDB row / column in for loop and output comma once
SOLVE
Hello,
I am pulling from two, separate HubDB Columns: product_type and standard.
product_type is a single select and standard is a multiselect.
If there are any rows in "standard", I want to output a comma after product_type. If I put the comma inside of the for loop, it iterates a new comma every time.
I want to output one comma after product_type, even if there are multiple standard items selected (the loop already outputs a comma after these items if there are more than one)
<div class="tagss"> {{ row.product_type.name }}, {% for category in row.standard %} {{ category.name }}{% if not loop.last %},{% endif %} {% endfor %} </div>
In my screenshot example, you'll see a comma after "Modules". Because there is no "standard" selected in HubDB, I don't want that comma to output.