CMS Development

DKhoo
Participante

Sort in email

Hi all! Hoping to get some help with a module I created, which we are using in a confirmation-style email to our customers.

 

Module:

{% email_each list="deal.line_items" item="line_item" %}
{% for item in email_each|sort(false, false, line_item.workshop_date) %}

 

<b>Workshop Date and Time(s):</b> {{line_item.workshop_date}} - {{line_item.start_time_s_}}<br>
<b>Number of Workshops:</b> {{line_item.quantity}} x {{line_item.delivery_method}}<br>
<b>Module:</b> {{line_item.business}} - {{line_item.name}}<br>

{% endfor %}
{% endemail_each %}

 

 

I was hoping the list would sort in order according to the line item table in the deal (we have sorted this by "line_item.workshop_date", however the order appears to be random so I added in a sort filter and enabled the programmable email beta in the module but am still having no luck. (In fact, after I added the sort in, the module stops populating info...)
 
Any idea on how I can get this to sort ascending by line_item.workshop_date? 
3 Respuestas 3
AKatzian
Colaborador

Sort in email

@DKhoo  Did you ever find a solution on that topic?

0 Me gusta
DKhoo
Participante

Sort in email

Thanks @dennisedson!

 

 @himanshurauthan  - any tips to help would be amazing, thanks so much in advance.

0 Me gusta
dennisedson
Equipo de producto de HubSpot
Equipo de producto de HubSpot

Sort in email

@himanshurauthan , can you assist with this one?

0 Me gusta